Here is the code for the table output:
Code: Select all
<?
// this section will display the data in a table allowing scores to be entered in the text boxes
echo "<table border='1'>
<tr>
<th width='200'>Contestant</th>
<th width='250'>School</th>
<th width='75'>Level</th>
<th width='25'>Score</th>
</tr>";
while($row = mysql_fetch_array($result))
{
$level = $row['level'];
if ($level == "1") $showlevel="Junior";
elseif ($level == "2") $showlevel="Senior";
echo "<tr>";
echo "<td width='200'>" . $row['contestant'] . "</td>";
echo "<td width='250' align='center'>" . $row['school'] . "</td>";
echo "<td width='75' align='center'>" . $showlevel . "</td>";
echo "<td width='25'><input type='text'></td>";
echo "</tr>";
}
echo "</table>";
?>
Fred SRMCS JR 80
Mary SRMCS JR 75
Sam SRMCS JR 85
The user would see a table with everything already displayed (except the score) and a text box for them to enter the score for each contestant. Then, have a submit button on the bottom and put those marks into the database with the appropriate name. Hopefully I am getting the "problem" across properly and it is possible to do this. Thanks for any help you can give.
Kevin