Possible Duplicate:
What is the best regular expression for validating email addresses?
hello,
can you help with my coding?
my problem is this: when the user wants to register, and when he entered his email. how can i check if it is valid or not?
i use this code.
please help me. tell me if its correct
because i'm only a beginner in php programming.
function checkEmail($email){
if(preg_match("/[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/", $email) > 0)
{
return true;
}
else
{
return false;
}
}
and when i run this code. it does not work. :-(