I am trying to update 2 rows from one table in a mysql database. At the same time I need to pass the data from both rows to another table. Can someone please help me figure out where the problem in my code is.
Echo("<br><br>");
Echo("<table width='90%' align='center' border='0' cellspacing='0' cellpadding='0'>");
Echo("<td><p align='center'><h3>Report Match Scores</h3></p></td>");
Echo("</table>");
Echo("<table width='90%' align='center' border='.5' cellspacing='0' cellpadding='0'>");
$result = mysql_query(
"SELECT * FROM bracket$round WHERE matchnum=$match.1");
if (!$result) {
echo("<P>Error performing query: " .
mysql_error() . "</P>");
exit();
}
while ( $row = mysql_fetch_array($result) ) {
$clannum=$row["clan1"];
$clanname=$row["clanname"];
Echo("<tr><td width='48%'><p align='center'>$clanname</p></td><td width='5%'><p align='center'>VS</p></td>");
$result1 = mysql_query(
"SELECT * FROM bracket$round WHERE matchnum=$match.2");
if (!$result) {
echo("<P>Error performing query: " .
mysql_error() . "</P>");
exit();
}
while ( $row = mysql_fetch_array($result1) ) {
$clannum=$row["clan2"];
$clanname=$row["clanname"];
Echo("<td width='47%'><p align='center'>$clanname</p></td></tr>");
Echo("<FORM ACTION = 'modules.php??op=modload&name=Supportsys&file=updated&round=$round&sore1=$score1&clan1=$clan1&score2=$score2&clan2=$clan2' METHOD = 'POST'>");
Echo("<tr><td width='48%'><p align='center'>Score <input type='text' name='score1' size='5' maxlength='55'></p></td><td width='5%'> </td><td width='47%'><p align='center'>Score <input type='text' name='score2' size='5' maxlength='55'></p></td></tr>");
Echo("</table>");
Echo("<table width='90%' align='center' border='0' cellspacing='0' cellpadding='0'>");
Echo("<input type='submit' name='Submit' value='Report Scores'><input type='reset' name='reset' value='reset'>");
echo("</table>");
Echo("</form>");
}}
I have gotten a lot of information and help just from reading this site. However, I can not find this one anywhere. This is the last page I have left to write for this site and am completely stumped.