Hello,
I found out it is not possible to update all 25 seeds at once using <select> HTML command so I changed that it to update each individually.
The process is to select, using <select>, one of hundred college teams from ncaa table and assign seed # to certain team.
Table: ncaa
Column name: team_name, seed, rec_win, rec_lose, id
Problem: I am not updating team properly. First UPDATE code will assign $1 to all teams. I want it to assign 1 (not $1) to selected team instead of $1 to all teams.
<?php
$updateseed ="UPDATE ncaa SET seed='$1'";
mysql_query($updateseed);
?>
<table width="300" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="text"> #1:</td>
<td><form action="testinsertteam.php" method="post"><select name="8">
<?
$query ="SELECT team_name FROM ncaa";
$result =mysql_query($query) or die(mysql_error());
while ($row =mysql_fetch_array($result)){
echo "<option ".$row["team_name"].">".$row["team_name"]."</option>";
}
?>
</select><input type="Submit" value="Update"></td>
</tr>
</table>
I also tried this code below:
<?php
$updateseed ="UPDATE ncaa SET seed='$1' WHERE team_name=$team_name";
mysql_query($updateseed);
?>
It did not update seed # or team info at all.