Forum Moderators: coopster

Message Too Old, No Replies

Suggestions on Form Validation

         

TymArtist

8:58 pm on Sep 22, 2005 (gmt 0)

10+ Year Member



I've been reading around on the web this afternoon, and made a post about form validation in another thread but thought maybe it would benefit the community to bring it to the forefront and make it a post.

What is everyone's favorite method for going about validating forms? The original way on our current site was Javascript, but it never worked. PHP seems super repetitive and tedious. I just saw some theories about XHTML and CSS methods of validating.

Anyway, post your favorite tutorials for this subject here, and any methods you find work efficiently and best for you. Community involvement without sarcasm! *ahem* :)

phpmaven

11:33 pm on Sep 22, 2005 (gmt 0)

10+ Year Member



Well,

There are really only two methods. Use JavaScript or check the form input via PHP or whatever flavor of scripting language you prefer and display an error page or the form with error messages on it.

You really should do both since enough people out there have JavaScript turned off and their form data would go into your database or wherever without validation.

JavaScript form validation is pretty straightforward, so I don't know why you have any problems with that.