我的代码在第5行返回错误:
致命错误:调用未定义的方法mysqli_stmt :: get_result()
$email = $_POST['email'];
$stmt = $con->prepare("SELECT password FROM users WHERE email=?");
$stmt->bind_param("s", $email);
$stmt->execute();
$result = $stmt->get_result();
$num_of_rows = $stmt->num_rows;
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$password = $row['password'];
$verify = password_verify($_POST['password'], $password);
if ($verify) {
echo "success";
}
else {
echo "not success";
}
}
}
else {
echo "incorrect username or password";
}
我正在运行PHP 5.6并启用了mysqlnd。