PHP - Validate E-mail


SUBMITTED BY: Guest

DATE: Oct. 7, 2014, 12:31 p.m.

FORMAT: Text only

SIZE: 170 Bytes

HITS: 1113

  1. PHP - Validate E-mail
  2. $email = test_input($_POST["email"]);
  3. if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
  4. $emailErr = "Invalid email format";
  5. }

comments powered by Disqus