Skip to content

Instantly share code, notes, and snippets.

@elieandraos
Created June 19, 2013 10:06
Show Gist options
  • Save elieandraos/5813209 to your computer and use it in GitHub Desktop.
Save elieandraos/5813209 to your computer and use it in GitHub Desktop.
Validate Email with php
/*
* validate email
*/
function is_valid_email($email)
{
if(preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email))
return true;
else
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment