note 84648 modified in function.ereg by danbrown
| From: | danbrown@php.net | Date: | Wed, 23 Jul 2008 16:13:18 +0000 |
| Subject: | note 84648 modified in function.ereg by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142618@lists.php.net to get a copy of this message | ||
Here is a simple way to verify an email address:
<?php
if(!ereg("^[a-zA-Z0-9\._\-]+@[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,4}$", $email))
$correct = true;
else
$correct = false;
?>
--was--
Here is a simple way to verify an email address:
if(!ereg("^[a-zA-Z0-9\._\-]+@[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,4}$", $email)) $correct = true;
else $correct = false;
http://php.net/manual/en/function.ereg.php