mysqli_fatch_array错误期望参数1

时间:2018-09-17 10:52:57

标签: php mysql

这是我的错误: 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");

0 个答案:

没有答案