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:
1.4m articles
1.4m replys
5 comments
57.0k users