0

我在我的 vps 上安装了 plesk 并按照标题升级了 php,现在我的 php 表单脚本已经停止工作。它进入电子邮件验证并返回电子邮件无效。它似乎可以到达这里 - 尝试了多个不同的 preg_match 字符串 - 任何想法。

 if (!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email)) {
  echo "<p>It appears you entered an invalid email address</p><p><a href='javascript: history.go(-1)'><font color=\"orange\">Click here to go back</font></a></p>"; 
} 

 elseif (!trim($name)) { 
  echo "<p>Please go back and enter a Name</p><p><a href='javascript: history.go(-1)'><font color=\"orange\">Click here to go back</font></a></p>"; 
}  

 elseif (!trim($email)) { 
  echo "<p>Please go back and enter an Email</p><p><a href='javascript: history.go(-1)'><font color=\"orange\">Click here to go back</font></a></p>"; 
} 

 elseif (!trim($telephone)) { 
  echo "<p>Please go back and enter a Telephone number</p><p><a href='javascript: history.go(-1)'><font color=\"orange\">Click here to go back</font></a></p>"; 
}

 elseif (!trim($eventaddress)) { 
  echo "<p>Please go back and enter the Event address number</p><p><a href='javascript: history.go(-1)'><font color=\"orange\">Click here to go back</font></a></p>"; 
}
4

0 回答 0