note 12715 deleted from function.ereg by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 01:24:58 +0000 |
| Subject: | note 12715 deleted from function.ereg by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20140@lists.php.net to get a copy of this message | ||
I didn't understand how the "return" worked, so I made an email validation using the
else, and lets you add print, and any other things in it.
if
(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-wyz][a-z](g|l|m|pa|t|u|v)?$",
$email)) {
print("Valid");
} else {
print("Invalid");
}