note 42005 deleted from function.eregi by betz
| From: | betz@php.net | Date: | Thu, 29 Apr 2004 07:26:21 +0000 |
| Subject: | note 42005 deleted from function.eregi by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-68986@lists.php.net to get a copy of this message | ||
Note Submitter: paranoidster@uboot.com
----
To check for a valid email use the following code: -
if (eregi ("^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,4}$", stripslashes(trim(**))))
** - this is the name of the field the email is typed in. In mine it looks like
if (eregi ("^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,4}$",
stripslashes(trim($_POST['email']))))
Hope this helps!!