diff --git a/sendform.php b/sendform.php index 14a0cc4..e58f3a6 100644 --- a/sendform.php +++ b/sendform.php @@ -288,8 +288,8 @@ $normal = "^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,4})$"; // define a regular expression for "strange looking" but syntactically valid addresses $validButRare = "^[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,})$"; - if (eregi($normal, $email)) return true; - else if (eregi($validButRare, $email)) return true; + if (preg_match($normal, $email)) return true; + else if (preg_match($validButRare, $email)) return true; else return false; } function writeStyles() { @@ -304,4 +304,4 @@ echo ""; } -?> \ No newline at end of file +?>