I am getting the above warning when I try to run this code:
$mysqli=new mysqli("localhost", "***", "***","***") or die(mysql_error()); function checklogin($username, $password){ global $mysqli; $result = $mysqli->prepare("SELECT * FROM users WHERE username = ?"); $result->bind_param("s", $username); $result->execute(); if($result != false){ $dbArray=mysql_fetch_array($result);