Email Validation
Moderator: General Moderators
Email Validation
How would i validate if the input email address really is an email address?
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Things like this are also readily available from the user comments on the regular expression functions in the PHP manual.
Mac
Mac
-
SuperHuman
- Forum Newbie
- Posts: 10
- Joined: Wed Oct 16, 2002 10:00 pm
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...';
}
?>