How can I do the following in mysqli prepare statement?
$result = mysql_query($sql); $data = mysql_fetch_assoc($result); return $data:
You need to use the MySQLi version of the functions:
$result = mysqli_query($sql); $data = mysqli_fetch_assoc($result); return $data;
That should do it, you also might want to take a look at:
2.1m questions
2.1m answers
60 comments
57.0k users