Return to Snippet

Revision: 25917
at April 14, 2010 03:38 by daipratt


Initial Code
function isValidEmail($email){
	$result =  eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email);

      if ($result == true){
         return $email;
      }else{
         return "";
      }
}

Initial URL
http://daipratt.co.uk

Initial Description

                                

Initial Title
Validate email address in php

Initial Tags
form, email, php

Initial Language
PHP