致命错误:调用未定义的方法mysqli_result :: fetch()

时间:2015-10-11 10:40:59

标签: php

当我尝试登录我的网站时出现此错误:

(!)致命错误:在第10行的C:\ wamp \ www \ Website \ index2.php中调用未定义的方法mysqli_result :: fetch()

还有代码

<?php require 'Connections/Connections.php'; ?>
<?php

if(isset($_POST['Entrar'])){


        $Email = $_POST['Email'];
        $Password = $_POST['Password'];

        $result = $con->query("SELECT * from user where Email='$Email' AND Password='$Password'");

        $row = $result->fetch(MYSQLI_BOTH);

        session_start();

        $_SESSION["User ID"] = $row['UserID'];

        hearder('Location: index.php');
    }
?>

0 个答案:

没有答案