Kerflumper
IS-IT--Management
I'm trying to setup an email form on a Godaddy server but it doesn't seem to like my preg_match functions (the form works otherwise, btw). I have the identical script on other servers with no issue. Here are the relevant snips:
The message I get is Warning: preg_match() [function.preg-match]: Unknown modifier ']'
What's wrong here?
Code:
$firstname=$_POST['firstname'];
$safefirstnamepattern = "/^[a-z \-.'()]+$/i";
if (preg_match($safefirstnamepattern,$firstname) === 0) {
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=formerror.php">';
exit();
}
The message I get is Warning: preg_match() [function.preg-match]: Unknown modifier ']'
What's wrong here?