-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");
不知道該怎麼辦!
而且麻煩的是? –
檢查你的')'在哪裏,有一個問題。 –
問題是一個解析錯誤 –