note 71043 deleted from function.preg-match by colder

From: Date: Mon, 18 Jun 2007 18:33:47 +0000
Subject: note 71043 deleted from function.preg-match by colder
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-127636@lists.php.net to get a copy of this message
Note Submitter: ---- I've seen lots of different and increasingly complicated ways to check an email on here. The one I use and which I copied from a book years back is: <?php if(eregi ("^[[:alnum:]][a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,6}$", stripslashes(trim($_POST['email'])))) { echo "good"; } else { echo "bad"; } ?> It's never let me down.

« previous php.notes (#127636) next »