hi,
how to validate email id in php...please send some code....lydia

hi,
how to validate email id in php...please send some code....lydia

something like this perhaps:

$email = "a@b.c"; 
 
if (stristr($email, "@") == false || stristr($email, ".") == false)
{ 
    die("No valid email");
 }
else
{
    echo("email = valid");
}

Didn't try it, but it might just work :)

Niek

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.