DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

PHP : Comprobar E-mail Válido / Check Valid E-mail

07.23.2007
| 6365 views |
  • submit to reddit
        Comprobar e-mail válido / Check valid e-mail
Código fuente / Source code :

function esEmailValido($email)
{
    if (ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([_a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]{2,200}\.[a-zA-Z]{2,6}$", $email ) )
	{
       return true;
    }
	else
	{
       return false;
    }
}