Re: Form validation: client- or server-side?
| From: | Matt Grimm | Date: | Fri, 09 Jan 2004 18:36:08 +0000 |
| Subject: | Re: Form validation: client- or server-side? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174161@lists.php.net to get a copy of this message | ||
Thanks for the great input guys. Sounds like I'm using a sound method now
with full server-side validation. Perhaps to make the most user- and
server-friendly forms, one could use JavaScript as a guide to the user,
alerting them to erroneous input and suggesting alternatives rather than
being relied upon for more serious validation.
--
Matt Grimm
"Matt Grimm" <mgrimm@healthtvchannel.org> wrote in message
news:20040109180529.50511.qmail@pb1.pair.com...
> 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: mgrimm@healthtvchannel.org
> Web: www.healthtvchannel.org