Re: Newbie ? re: form validation
| From: | Alex Shi | Date: | Sat, 29 Sep 2001 02:17:44 +0000 |
| Subject: | Re: Newbie ? re: form validation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-69240@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "Vicki" <vickimills@earthlink.net>
To: <php-general@lists.php.net>
Sent: Friday, September 28, 2001 9:54 PM
Subject: [PHP] Newbie ? re: form validation
> I've browsed around so much for answers to this question that now I'm
> completely confused. I have a couple simple forms with basic contact
> info and a script for inserting the values in a mySQL database. But now
> I want to include some basic validation, which I assume should go in the
> PHP script.
>
> I'd like to made sure that
>
> 1) the e-mail address is valid
You can search zend.com to find an email validation script.
There is also an article about form validation on zend.com
> 2) the 2-character state code is entered correctly
Use a drop-down box on your form page. I think you can just copy one
from an e-commerce site.
> 3) a userid is unique
I think you have to use a database to check for uniqueness.
>
> I think I've found some script for the e-mail validation, but is there a
> built in php function for this,
I don't think so.
> and if so, which is best?
> I don't have any idea how to do the state codes. Do I set up a database
> table with state abbreviations and then somehow check against it? How?
>
> Any advice about this subject would be greatly appreciated.
>
> Vicki
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>