Fixed some issues in PHP form class