I'm in the process of making a forum, I'm trying to take values from a MySQL and put them in the $f_id, $f_name, $f_desc and $f_date" variables. It's not working for some reason:
<?php session_start(); require"db_connect.php"; $sql = "SELECT forum_id, forum_name, forum_desc, forum_date FROM forum_tbl"; if ($query = $db->prepare($sql)){ $query->bind_result($f_id, $f_name, $f_desc, $f_date); $query->execute(); }else{ echo $db->error; } ?> And the contents of connect.php:
<?php $db = new mysql("DOMAIN","USERNAME","PASSWORD") or die ("ERROR"); ?>