if (isset($_POST['posted'])) {
$email = $_POST['email'];
$theresults = ereg("^[^@ ]+@[^@ ]+\.[^@ \.]+$", $email, $trashed);
if ($theresults) {
$isamatch = "Valid";
} else {
$isamatch = "Invalid";
}
echo "Email address validation says $email is " . $isamatch;
}
?>