Trying to get code to search if \'@\' symbol is present in typed-in email address and echo if symbol is not. Everything works fine without the searching for @ code.
chec
It will not only validate email address, but also sanitize it for unexpected characters:
$email = $_POST['email']; $emailB = filter_var($email, FILTER_SANITIZE_EMAIL); if(filter_var($emailB, FILTER_VALIDATE_EMAIL) === false || $emailB != $email ) { echo "This email adress isn't valid!"; exit(0); }