RE: [PHP] how do I check for this

From: Date: Tue, 17 Oct 2000 08:36:07 +0000
Subject: RE: [PHP] how do I check for this
Groups: php.general 
Request: Send a blank email to php-general+get-20558@lists.php.net to get a copy of this message
> Is there a simple function for validating emails? Function validEmail($emailaddress) { // Validates the email address. I guess it works. *shrug* if (eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$", $emailaddress, $check)) { if ( getmxrr(substr(strstr($check[0], '@'), 1), $validate_email_temp) ) { return "valid"; } else { return "invalid-mx"; } } else { return "invalid-form"; } } This one's working for me. Jason

« previous php.general (#20558) next »