I'm a still learning PHP and I'm programming a .php Registration webpage, and I want to make sure that the e-mail is valid (if the user doesn't type @ or . he will get a error message).
That's the e-mail part:
$Email = $_POST['email'];
$needle = '@';
$search = strpos($Email, $needle);
elseif ($search == FALSE)
{
echo "Your e-mail is not valid.";
}
How can I make it with multiple letters instead of only @? I want to add the dot (.com) as well, I added it on $needle but it doesnt work. Thanks in advance.