Please i need help concerning this code. I want to hide rows whose total is zero. Once a row have zero as value for total i want it hidden. I need this assistance asap. Thank you
$query = "SELECT * FROM firsttermsar
WHERE studentID=$stuID AND year=\"$_SESSION[year]\"";
#27
$result = mysql_query($query)
or die ("Couldn't execute query.");
while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
echo "<h2> FIRST TERM RESULT for $namet during the SESSION $year</h2>";
echo "<table class='table1'>";
echo "<tr>";
echo "<td><b>Mark Obtainable</b></td>";
echo "<td><b>CA(30)</b>
</td>
<td><b>Exam</b></
td> <td><b>Total(70)</b><
/td><td><b>Grade</b>
</td><td><b>Comment<
/b></td><td><b>Teac
her's Signature</b></td></tr>
";
if ($total>="1")
echo "<td>English Language: </td>";
echo "<td>{$row['firstengtest']}<
/td> <td>{$row['firstengexam']}</td>
<td>";
$total = $row['firstengtest']+$row['firstengexam'
];
echo $total."</td><td>";
if ($total>="70")
echo "A ";
elseif ($total>="60")
echo "B";
elseif ($total>="50")
echo "C";
elseif ($total>="40")
echo "D";
elseif ($total>="30")
echo "E";
elseif ($total=="0")
echo "-";
else
echo "F";
echo "</td><td> </td> <td>";
if ($total>="70")
echo "EXCELLENT";
elseif ($total>="60")
echo "VERY GOOD";
elseif ($total>="50")
echo "GOOD";
elseif ($total>="40")
echo "PASS";
elseif ($total>="30")
echo "POOR";
elseif ($total=="0")
echo "-";
else
echo "FAIL";
echo "</td></tr>";
echo "<tr>";
echo "<td>Mathematics </td>";
echo "<td>{$row['firstmathtest']}<
/td> <td>{$row['firstmathexam']}</td
> <td>";
$total = $row['firstmathtest']+$row['firstmathexa
m'];
echo $total."</td><td>";
if ($total>="70")
echo "A";
elseif ($total>="60")
echo "B";
elseif ($total>="50")
echo "C";
elseif ($total>="40")
echo "D";
elseif ($total>="30")
echo "E";
elseif ($total=="0")
echo "-";
else
echo "F";
echo "</td><td> </td> <td>";
if ($total>="70")
echo "EXCELLENT";
elseif ($total>="60")
echo "VERY GOOD";
elseif ($total>="50")
echo "GOOD";
elseif ($total>="40")
echo "PASS";
elseif ($total>="30")
echo "POOR";
elseif ($total=="0")
echo "-";
else
echo "FAIL";
echo "</td></tr>";
echo "<tr>";
echo "<td>Physics: </td>";
echo "<td>{$row['firstphytest']}<
/td> <td>{$row['firstphyexam']}</td>
<td>";
$total = $row['firstphytest']+$row['firstphyexam'
];
echo $total."</td><td>";
if ($total>="70")
echo "A";
elseif ($total>="60")
echo "B";
elseif ($total>="50")
echo "C";
elseif ($total>="40")
echo "D";
elseif ($total>="30")
echo "E";
elseif ($total=="0")
echo "-";
else
echo "F";
echo "</td><td> </td> <td>";
if ($total>="70")
echo "EXCELLENT";
elseif ($total>="60")
echo "VERY GOOD";
elseif ($total>="50")
echo "GOOD";
elseif ($total>="40")
echo "PASS";
elseif ($total>="30")
echo "POOR";
elseif ($total=="0")
echo "-";
else
echo "FAIL";
echo "</td></tr>";
echo "<tr>";
echo "<td>Chemistry: </td>";
echo "<td>{$row['firstchemtest']}<
/td> <td>{$row['firstchemexam']}</td
> <td>";
$total = $row['firstchemtest']+$row['firstchemexa
m'];
echo $total."</td><td>";
if ($total>="70")
echo "A";
elseif ($total>="60")
echo "B";
elseif ($total>="50")
echo "C";
elseif ($total>="40")
echo "D";
elseif ($total>="30")
echo "E";
elseif ($total=="0")
echo "-";
else
echo "F";
echo "</td><td> </td> <td></td></tr>";