Return to Snippet

Revision: 31143
at August 30, 2010 23:20 by sandrews_06

Initial Code
//Bad Email...
$badEmail = "[email protected]";

//Run the email through an email validation filter.
if( !filter_var($badEmail, FILTER_VALIDATE_EMAIL) ){
  echo "Email is no good.";
  echo "Nice email.";

//Result - Email is no good.

Initial URL

Initial Description

Initial Title
Check Valid Email using filter_var

Initial Tags
email, php, validation

Initial Language