I keep getting the follwing error with this piece of code
----------------- Error ------------------------------
mysql_fetch_array(): supplied argument is not a valid MySQL result resource.
------------------ Code -------------------------------
$c1 = $_SESSION['subject_id'];
$query_result = mysql_query ("SELECT * FROM subjects WHERE subject_id = '$c1'");
while ($row = mysql_fetch_array ($query_result, MYSQL_NUM))
{
$cc1 = $row[2];
echo "<p>You have choosen to give grinds for the <font size='+1'> $cc1 </font></p>";
}
Tks
----------------- Error ------------------------------
mysql_fetch_array(): supplied argument is not a valid MySQL result resource.
------------------ Code -------------------------------
$c1 = $_SESSION['subject_id'];
$query_result = mysql_query ("SELECT * FROM subjects WHERE subject_id = '$c1'");
while ($row = mysql_fetch_array ($query_result, MYSQL_NUM))
{
$cc1 = $row[2];
echo "<p>You have choosen to give grinds for the <font size='+1'> $cc1 </font></p>";
}
Tks