email validation
Posted: Mon Apr 19, 2004 8:19 am
Code: Select all
<?php
if ( !checkString( $email) || !eregi( "^[A-Za-z0-9\_-]+@[A-Za-z0-9\_-]+.[A-Za-z0-9\_-]+.*", $email)) {
echo "You have entered an <b>invalid email</b>.<br> Please go back and try again.";
exit;
}
?>I have no idea why the '@' sign works while the 'dot' after that doesn't! Any suggestions as to why this might be the case? Any help would be greatly appreaciated