-5
我到PHP新手,尝试写验证问题是我有在这行代码麻烦我form.now代码:多个preg_match查询?
$fullname_pattern = "/[a-zA-Z]+/";
$fullname = $_POST['fullname'];
$email = $_POST['email'];
$email_pattern = "/^[a-zA-Z]+([a-zA-Z0-9]+)[email protected][a-zA-Z]{3,50}\.(com|net|org)/";
$password = $_POST['password'];
$password_pattern = "/(.){6,12}/";
if(preg_match($fullname_pattern,$fullname)) &&
(preg_match($email_pattern,$email)) &&
(preg_match($password_pattern,$password))
{
header("Location: home.php");
}
else
header("Location: registration.php");
不知道该怎么办!
而且麻烦的是? –
检查你的')'在哪里,有一个问题。 –
问题是一个解析错误 –