hi im attempting to update a script and i have come across the following error PHP Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in so here was the orginal
$sql = "select * from chat where (chat.to = '".mysqli_real_escape_string($_SESSION['usernamechat'])."' AND recd = 0) order by id ASC";
of which i changed to
$sql = "select * from chat where (chat.to = '".mysqli_real_escape_string($conn, $_SESSION['usernamechat'])."' AND recd = 0) order by id ASC";
and still getting the same error any ideas anyone
ty in advance jan x