SOLVED<<<
I've been busy with creating my CMS and got stuck at a function which throws me this error:
Fatal error: Call to a member function query() on a non-object in E:\Xampp\htdocs\CMS_PF\includes\functions\functions.php on line 40
and it correspondends with this part of the script:
function isUserAdmin($email){
global $mysqli;
$acces_admin = 3;
$query = "SELECT access FROM user WHERE email='$email'";
$result = $mysqli->query($query);
while($row = mysqli_fetch_assoc($result)) {
$user_access = $row['access'];
if($user_access == 3){
return true;
}
}
}
Where the error is coming from the $result line.
I got no clue why it is throwing this error and was hoping someone could point it out for me.
Thanks in advance, Remy.