RE: [PHP] Form validation

From: Date: Fri, 26 Apr 2002 02:10:08 +0000
Subject: RE: [PHP] Form validation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94689@lists.php.net to get a copy of this message
> I'd recommend you write down a list of EVERYTHING you'd like to achieve, > and > then we can help you build some code to use, or recommend a class. I'd recommend putting your validation and formatting together, too. I hate it when some people enter names into my database in all caps, and some all lowercase. So in my validation routine, I make sure that the name is only letters, (except for a possible ' for last names like O'Reilly), and then do the formatting by making just the first letter uppercase. Same thing for phone numbers and social security numbers for example. You can validate and accept the input in a variety of formats, but have the validation routine return them in a common format to insert into the database. ---John Holmes...

« previous php.general (#94689) next »