这是我的错误: mysqli_fetch_array()期望参数1为mysqli_result,给定布尔值...
$query = "SELECT `id` FROM `Users` WHERE `email` = '".mysqli_real_escape_string($conn , $_POST['email'])."'";
$result = mysqli_query($conn, $query);
$row=mysqli_fetch_array($result);
if (isset($row)){
$hashedpassword=$_POST['password'];
if ($hashedpassword == $row['password']){
$_SESSION['id']=$row['id'];
if ($_POST['stayloggedin'] == '1'){
setcookie("id", mysqli_insert_id($link), time() + 60*60*24*365);
}
header("Location: loggedinpage.php");