Re: Form validation and save the form
| From: | Robert Cummings | Date: | Mon, 11 Jan 2010 14:58:06 +0000 |
| Subject: | Re: Form validation and save the form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-300978@lists.php.net to get a copy of this message | ||
Angelo Zanetti wrote:
-----Original Message----- From: aditya shukla [mailto:adityashukla1983@gmail.com] Sent: 11 January 2010 07:37 AM To: php-general Subject: [PHP] Form validation and save the form Hello Guys, I am trying to validate a form for user input , such that when something is missing load the form again by focusing on the wrong field.Say i don not enter my address so when the form loads everything else is saved and the form points to address field. Thanks Aditya You need Javascript for that not PHP. PHP is server side, javascript is client side (browser).He doesn't say anything about not reloading the form... in fact he explicitly says "when something is missing load the form again". This suggests a server request and not JavaScript. Either way... validation can occur either in JavaScript or PHP... but it should ALWAYS occur in PHP regardless of any JavaScript validation. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP