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

Recommended Answers

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 …

Jump to Post

All 2 Replies

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, learning, and sharing knowledge.