PHP突然显示此错误

时间:2017-11-04 11:47:43

标签: php phpmyadmin

这是我的登录代码:

<?php
$con = mysqli_connect("localhost", "id2815222_b1gbrother", "orwell", "id2815222_database");

$studentno = $_POST["studentno"];
$password = $_POST["password"];

$statement = mysqli_prepare($con, "SELECT * FROM bigbrother WHERE studentno = ? AND password = ?");
mysqli_stmt_bind_param($statement, "is", $studentno, $password);
mysqli_stmt_execute($statement);

mysqli_stmt_store_result($statement);

mysqli_stmt_bind_result($statement, $userID, $studentno, $firstname, $middlename, $lastname, $date, $password, $number);

$response = array();
$response["success"] = false;  

while(mysqli_stmt_fetch($statement)){
    $response["success"] = true;  

}

echo json_encode($response);

&GT;

昨晚这个运行完美,然后今天下午显示了这个错误:

  

警告:mysqli_stmt_execute():第9行/storage/ssd3/222/2815222/public_html/login2.php中的数据提前结束(mysqlnd_wireprotocol.c:1130)

     

警告:mysqli_stmt_execute():RSET_HEADER数据包比第9行/storage/ssd3/222/2815222/public_html/login2.php中的预期短4个字节

     

警告:mysqli_stmt_execute():在第9行的/storage/ssd3/222/2815222/public_html/login2.php中读取结果集标题时出错   {&#34;成功&#34;:假}

我的数据库包含:user idfirstnamemiddlenamelastnamedatepasswordnumber作为列。感谢

0 个答案:

没有答案