在布尔第12行调用成员函数fetch_assoc()

时间:2016-02-28 08:22:14

标签: php mysqli pdo

所以我收到了这个错误

Fatal error: Call to a member function fetch_assoc() on boolean in C:\wamp64\www\ucp\prikazikorisnika.php on line 12

这是我的代码,只是因为你知道我不擅长这个,但我正在努力

    <?php 
session_start();

require 'includes/connect.php';

if(!isset($_SESSION['user']))
{
    header("Location: index.php");
}
$rez = $konekcija->query("SELECT * FROM korisnici WHERE username =".$_GET['user']);

     $userRow = $rez->fetch_assoc();
     $korime = $userRow['username'];
     $email = $userRow['email'];



$ime = $_GET['user'];
?>

0 个答案:

没有答案