The Status was an example of another field that exists on the form.
Here is my full code:
case 'editscore':
$confid = intval($_GET['conf']);
$winid=$_POST['winid'];
$query="SELECT s2010_wins.status, s2010_wins.windate, s2010_wins.wintime, s2010_wins.wincomments, s2010_wins.teamcomments, s2010_wins.field, s2010_wins.field_no, s2010_wins.winner, s2010_wins.loser, s2010_wins.winortie, s2010_wins.rf, s2010_wins.ra, s2010_teams.teamname AS winningteam, s2010_teams2.teamname AS losingteam FROM s2010_wins, s2010_teams, s2010_teams AS s2010_teams2 WHERE s2010_wins.winid=$winid AND s2010_teams.teamid = s2010_wins.winner AND s2010_teams2.teamid = s2010_wins.loser";
$result=mysql_query($query);
$score = mysql_fetch_array($result, MYSQL_ASSOC);
$wincomments = str_replace('"','"',$score['wincomments']);
$wincomments = str_replace("'",''',$wincomments);
$teamcomments = str_replace('"','"',$score['teamcomments']);
$teamcomments = str_replace("'",''',$teamcomments);
$field = str_replace('"','"',$score['field']);
$field = str_replace("'",''',$field);
$status = str_replace('"','"',$score['status']);
$status = str_replace("'",''',$status);
$field_no = str_replace('"','"',$score['field_no']);
$field_no = str_replace("'",''',$field_no);
$month=date('m',$score['windate']);
$day=date('d',$score['windate']);
$year=date('Y',$score['windate']);
$hour=date('g',$score['wintime']);
$minute=date('i',$score['wintime']);
$ampm=date('a',$score['wintime']);
print "<form action=\"$report_page?action=updatescore&conf=$confid\" method=\"post\">\n";
?>
<table width='100%' class='tbl-border'>
<tr><td colspan='2' class='tbl1'><b>Status:</b> <?print $status;?></td></tr>
<tr><td colspan='2' class='tbl1'><b>Date:</b> <?print $month?>/<?print $day?>/<?print $year?></td></tr>
<tr><td colspan='2' class='tbl1'><b>Time:</b> <?print $hour?>:<?print $minute?> <?print $ampm?></td></tr>
<tr><td class='tbl1'><b>Field:</b> <?print $field;?></td><td class='tbl1'><b>Field No:</b> <?print $field_no;?></div></td></tr>
// Attempted to Change to remove the DROP DOWN Menu - UNSUCCESSFUL!
<tr><td class='tbl1'><b>Home Team</b>:
<?php
$query2="SELECT s2010_teams.teamid, s2010_teams.teamname, s2010_divs.divname FROM s2010_teams, s2010_divs WHERE s2010_teams.active = 1 AND s2010_teams.teamdiv = s2010_divs.divid AND s2010_divs.conference = $confid ORDER BY divorder ASC, teamname ASC";
$result2=mysql_query($query2);
while ($teams = mysql_fetch_array($result2, MYSQL_ASSOC)) {
echo "" . $teams['teamname']."";
}
print "</td><td bgcolor='#FFFF00'><b>Score:</b> <input type=\"text\" name=\"rf\" size=\"2\" maxlength=\"2\" value=\"{$score['rf']}\" /></td></tr>\n";
?>
<tr><td colspan='2' align='center' bgcolor='#FFFF00'> <select name="winortie">
<option value="3"
<?php
if ($score['winortie'] == 3) {
echo 'selected="selected"';
}
?>
>Play - Scheduled
</option>
<option value="1"
<?php
if ($score['winortie'] == 1) {
echo 'selected="selected"';
}
?>
>Beat
</option>
<?php if ($forfeit) {
print "<option value=\"2\" ";
if ($score['winortie'] == 2)
print "selected=\"selected\"";
print ">Beat (by forfeit)</option>\n";
}
?>
<?php if ($show_ties) {
print "<option value=\"0\" ";
if ($score['winortie'] == 0)
print "selected=\"selected\"";
print ">Tied</option>\n";
}
?>
<option value="4"
<?php
if ($score['winortie'] == 4) {
print "selected=\"selected\"";
}
?>
>Lost to
</option>
<?php if ($forfeit) {
print "<option value=\"5\" ";
if ($score['winortie'] == 5)
print "selected=\"selected\"";
print ">Lost to (by forfeit)</option>\n";
}
?>
</select></td></tr>
// Original version of Team Display in DROP DOWN MENU
<tr><td class='tbl1'><b>Visiting Team:</b> <select name="loser">
<?php
$query3="SELECT s2010_teams.teamid, s2010_teams.teamname, s2010_divs.divname FROM s2010_teams, s2010_divs WHERE s2010_teams.active=1 AND s2010_teams.teamdiv = s2010_divs.divid AND s2010_divs.conference = $confid ORDER BY divorder ASC, teamname ASC";
$result3=mysql_query($query3);
while ($teams = mysql_fetch_array($result3, MYSQL_ASSOC)) {
echo "<option value=\"{$teams['teamid']}\"";
if ($teams['teamid'] == $score['loser']) {
print " selected=\"selected\"";
}
print ">{$teams['teamname']}</option>\n";
}
print "</select></td><td bgcolor='#FFFF00'><b>Score:</b> <input type=\"text\" name=\"ra\" size=\"2\" maxlength=\"2\" value=\"{$score['ra']}\" /></td></tr>\n";
?>
<tr><td colspan='2' class='tbl1'><b>Comments:</b> <input name="teamcomments" type="text" value="<?php print $teamcomments;?>" size="70">
<input type="hidden" name="winid" value=<?php print $winid;?>>
</td></tr>
<tr><td colspan='2' class='tbl1' align='center'><input type="submit" value="Update"></p>
</form>
<?php
print "<form method=\"get\" action=\"$report_page\">\n";
print "<input type=\"hidden\" name=\"action\" value=\"mainview\" />\n";
print "<input type=\"hidden\" name=\"conf\" value=\"$confid\" />\n";
print "<input type=\"submit\" value=\"Cancel\"></td></tr></table></form>\n";
You can see my attempted change in Home Team display. Visiting Team display is not alterred and displays the drop down menu with the predetermined team selected. I am still getting a list of the Division Teams in Home Team echo and only want to echo the selected team in text display.