Hey guys, I'm getting the above error, could any of you tell me why? Here's the code
$mysqli=new mysqli("localhost", "***", "***","***") ;
if(!$mysqli){
die("Database 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=$result->fetch_array();