Re: testing an email address
| From: | Intruder | Date: | Fri, 12 Oct 2001 16:09:01 +0000 |
| Subject: | Re: testing an email address | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70936@lists.php.net to get a copy of this message | ||
JB> Is there a PHP function to test whether an email address is valid or not?
There is no such a function as for PHP4.0 ;)))
But you can use this one
function validmail($email) {
if(eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,3}$", $email)) return TRUE;
else return FALSE;
};