有@mysql_select_db後無模具()中,加入這一點。第13,19,20,21行之後沒有分號,也添加了它們。
<?php
$inputuser = $_POST["usernamelogin"];
$inputpass = $_POST["passlogin"];
$inputemail = $_POST["emaillogin"];
$usernamelogin = "";
$passlogin = "";
$emaillogin = "";
$connect = mysql_connect("localhost",$usernamelogin,$passlogin,$emaillogin);
@mysql_select_db($website_information) or die("Database error number 1");
$query = "SELECT * FROM `critical_account_information` WHERE `usernamelogin` = '$inputuser'";
$querypass = "SELECT * FROM `critical_account_information` WHERE `passlogin` = '$inputpass'";
$queryemail = "SELECT * FROM `critical_account_information` WHERE `emaillogin` = '$inputemail'";
echo $query;
echo $querypass;
echo $queryemail;
mysql_close();
?>
有一個分號(',' )缺少結束 – kero 2014-10-08 11:06:44
之前的行的語句VS的專家應該能夠通過一點努力找到像這樣的語法錯誤。 – GolezTrol 2014-10-08 11:07:48
另外我會建議找到另一個教程。 'mysql_'函數已被棄用,將來(可能)將被刪除。切換到[PDO或MySQLi](http://stackoverflow.com/questions/13569/mysqli-or-pdo-what-are-the-pros-and-cons)並從頭開始學習 – kero 2014-10-08 11:08:48