- Impact
- 11
I working on a project, but i dont know how to fix the problem i have. The code below was with a script i got, but it doesnt work. Its suppose to check if the email has valid characters but it says it has invalid characters no matter what i type (ill do [email protected], testgmail.com, test@gmailcom, testgmailcom, and none will work)
Can anyone fix it? Thanks!
PHP:
if (!preg_match('/^[A-z0-9_\-]+\@(A-z0-9_-]+\.)+[A-z]{2,4}$/', $email)){
$err = 1;
$error_html .= "$LANG_err_email.<br><br>\n";
}
Can anyone fix it? Thanks!





