note 36438 deleted from function.ereg by vincent

From: Date: Thu, 09 Oct 2003 13:45:25 +0000
Subject: note 36438 deleted from function.ereg by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-58137@lists.php.net to get a copy of this message
Note Submitter: Tony ---- How would this work for an email validator? Checks for @ and dot, but not at end (@ also not allowed at beginning). Still new at this, and there's probably an easier way. <? if ((false == (ereg("@",$em))) | (false == (ereg("\.",$em))) | (false == (eregi("[_0-9a-z-]",$em))) | (ereg("\.$",$em)) | (ereg("@$",$em)) | (ereg("^@",$em))){ bademail=1; ?>

« previous php.notes (#58137) next »