Monthly Archives: May 2011

Validate Email in PHP

Use this function to validate email in PHP. Pass your email in this function by calling it.if  it returns false then email is not valid else valid. function checkEmail($email_address = null){ if(preg_match("/^[a-zA-Z]*w+(.w+)*@w+(.[0-9a-zA-Z]+)*.[a-zA-Z]{2,4}$/", $email_address) === 0){ return false; } else{ return true; } }function checkEmail($email_address = null){ if(preg_match("/^[a-zA-Z]*w+(.w+)*@w+(.[0-9a-zA-Z]+)*.[a-zA-Z]{2,4}$/", $email_address) === 0){ return false; } else{ return… Read More »