Whats wrong with this code? I think it has something to do with the mysql_Fetch_Array, but what do I know? Plz help
<?PHP
$forum = 1;
$conn = mysql_connect("*********", "********", "*******") or die("<B>Could not connect</B>");
mysql_select_db("**********", $conn);
$result = mysql_query("SELECT * FROM forums WHERE number=$forum - 1", $conn) or die("<B>Invalid query</B>");
$getrows = mysql_query("SELECT * FROM forums", $conn);
$numforums = mysql_num_rows($getrows);
//list all the forums
while ($forum <= $numforums) {
$current = mysql_Fetch_Array($result);
echo "<BR><BR><U><FONT COLOR=#0000FF SIZE=+1>".$current[name]."</U><BR>";
echo "<FONT SIZE=-1>".$current[desc]."</FONT>";
$forum++;
}
?>
<?PHP
$forum = 1;
$conn = mysql_connect("*********", "********", "*******") or die("<B>Could not connect</B>");
mysql_select_db("**********", $conn);
$result = mysql_query("SELECT * FROM forums WHERE number=$forum - 1", $conn) or die("<B>Invalid query</B>");
$getrows = mysql_query("SELECT * FROM forums", $conn);
$numforums = mysql_num_rows($getrows);
//list all the forums
while ($forum <= $numforums) {
$current = mysql_Fetch_Array($result);
echo "<BR><BR><U><FONT COLOR=#0000FF SIZE=+1>".$current[name]."</U><BR>";
echo "<FONT SIZE=-1>".$current[desc]."</FONT>";
$forum++;
}
?>