note 75247 deleted from function.eregi by nlopess
| From: | nlopess@php.net | Date: | Sun, 20 May 2007 13:55:58 +0000 |
| Subject: | note 75247 deleted from function.eregi by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-126761@lists.php.net to get a copy of this message | ||
Note Submitter: Naxon
----
How am I checking a mail?
<?php
$mail = $_POST['mail'];
if (eregi("^[a-z0-9A-Z].'@'.^[a-z0-9A-Z].'.'.^[a-z0-9A-Z]", $mail)) {
echo "Valid!";
} else {
echo "Invalid!";
}
?>
Is it right?