Re: email qualification
| From: | Robert V. Zwink | Date: | Thu, 15 Jun 2000 14:39:33 +0000 |
| Subject: | Re: email qualification | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1945@lists.php.net to get a copy of this message | ||
I use this, its not the best, but is quick and dirty. -@-._ will pass as
valid. This best non-quick and dirty is at:
http://www.zend.com/codex.php?id=88&single=1
if(strstr($key, "email")){
if(eregi("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$",$value)
== 0){
print "<HTML><HEAD><META HTTP-EQUIV=\"Refresh\" CONTENT=\"3;
URL=$HTTP_REFERER\"></HEAD></HTML>";
echo "Incorrect email format. Please enter a valid email format then
re-submit";
exit;
}
}
Robert V. Zwink
http://zwink.levitate.org
"If there's ever a problem, I film it and it's no longer a problem. It's a
film." - Andy Warhol
----- Original Message -----
From: "John Hogan" <john.hogan@sparknet.net>
To: <php-general@lists.php.net>
Sent: Thursday, June 15, 2000 10:27 AM
Subject: [PHP-GENERAL] email qualification
> anyone have a quick and dirty checker to validate an email address?
>
> in advance,
>
> muchas gracias
>
>
> --
> 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
>