Page 1 of 1

Email Validation

Posted: Wed Oct 16, 2002 12:54 am
by Zoram
How would i validate if the input email address really is an email address?

Posted: Wed Oct 16, 2002 12:59 am
by volka
search for "validate AND email"

Posted: Wed Oct 16, 2002 2:15 am
by twigletmac
Things like this are also readily available from the user comments on the regular expression functions in the PHP manual.

Mac

Posted: Wed Oct 16, 2002 10:19 pm
by SuperHuman

Code: Select all

<?php


$email = ' ';
if ( preg_match( '/^їA-z0-9_-]+ї@]їA-z0-9_-]+(ї.]їA-z0-9_-]+)+їA-z]{2,4}$/', $email ) ) {
      echo 'Valid email in type...';
} else {
      echo 'Not valid in type...';
}


?>