Hi,
i have the following snippet of php that i wrote but cant figure out why it wont work all the variables have been set before hand.
Heres the PHP:
echo "<table border='1'>
<tr>";
if ($win_score > $lose_score) {
echo "
<th>Winner</th>
<th>Loser</th>
<th>Win Score</th>
<th>Lose Score</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['winner'] . "</td>";
echo "<td>" . $row['loser'] . "</td>";
echo "<td>" . $row['win_points'] . "</td>";
echo "<td>" . $row['lose_points'] . "</td>";
echo "</tr>";
}
echo "</table>";
}
When $win_score value is greater than $lose_score value its meant to display a table with some data in it but it just displays an empty table with the column headers.