Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php filter validate email

<?php
$email_a = 'joe@example.com';
$email_b = 'bogus';

if (filter_var($email_a, FILTER_VALIDATE_EMAIL)) {
    echo " $email_a is valid email.";
}
if (filter_var($email_b, FILTER_VALIDATE_EMAIL)) {
    echo " '$email_b' is valid email.";
} else {
    echo "$email_b ooops NOT VALID try again";
}
?>
 
PREVIOUS NEXT
Tagged: #php #filter #validate #email
ADD COMMENT
Topic
Name
6+1 =