Re: eregi problems
| From: | Marek Kilimajer | Date: | Thu, 04 Jul 2002 15:35:15 +0000 |
| Subject: | Re: eregi problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105460@lists.php.net to get a copy of this message | ||
If the regexp matches, it is a valid email, so you need ! in front of it.
dan radom wrote:
I've got a form that's posted to a php page where I'm attempting to validate a field contains a valid email address. The eregi below seems to be totally ignored...
if (eregi("^[a-z0-9\._-]+@[a-z0-9\._-]+$", $emp_email)) {
echo "<center>please enter a valid email address</center>";
exit;
}
$emp_email is being posted to the form. Any ideas why this is being ignored?
dan