I realize this has probably been answered before, and I'm sorry to ask a repeated question, but its rather hard to find since google filters out a lot of words.
Well anyway, here is the code I am currently using, and every time I execute it I get the error
"You have an error in your SQL syntax near 'index WHERE fid = '1'' at line 1"
$f = "1";
$forum = array(1 => "lounge", "school", "religion", "stupidity", "good stuff");
$db2 = mysql_connect("localhost", "usrname", "pw");
mysql_select_db('markar_nu_-_forum',$db2);
$query2 = "SELECT * FROM index WHERE fid = '".$f."'";
$result2 = mysql_query($query2) or die(mysql_error());
$num = mysql_numrows($result2);