Re: Form validation: client- or server-side?

From: Date: Fri, 09 Jan 2004 18:13:09 +0000
Subject: Re: Form validation: client- or server-side?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-174153@lists.php.net to get a copy of this message
On Fri, 2004-01-09 at 11:07, Matt Grimm wrote: > 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. I do both server and client side...javascript helps with the really basic and server-side helps with the complicated stuff. My theory is do as much on the client and then do server-side. -- Ray

« previous php.general (#174153) next »