Welcome to DevelNet, a code gallery for creating, saving and sharing all kinds of code snippets.

PHP — Validate Email ith PHP

Posted On: Wednesday, January 14, 2015 at 7:34 PM

Fuunction to validate email adress
function valid_email($email_address) 
{
if(eregi("^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email_address))
return true;
else
return false;
}