Yes, it's considered best practice to do as much client-side validation as you can as to save your server time and load.
This doesn't mean you still shouldn't do full validation on the server-side, but the fewer times the form is posted to your site the better. You might want to recheck what Javascript can do now - it's pretty extensive for a client-side scripting language. -M -----Original Message----- From: Matt Grimm [mailto:[EMAIL PROTECTED] Sent: Friday, January 09, 2004 1:08 PM To: [EMAIL PROTECTED] Subject: [PHP] Form validation: client- or server-side? Is there a distinct advantage to doing form validation / error checking on the server side using PHP? That's how I've always done it because I know PHP better than JavaScript, but wouldn't it make sense to validate as much of your form as possible using JavaScript before the form was ever posted? I'm just talking about the basics, like empty required fields, illegal characters, string lengths, etc. What are your preferred methods? I do an awful lot of content management with HTML forms, so it's not an entirely spurious question. -- Matt Grimm Web Developer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Parkway Anchorage, AK 99508 907.770.6200 ext. 686 907.336.6205 (fax) E-mail: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php