Jump to content

Recommended Posts

I have a script that I only want to echo: team name (the team that is already assigned).  It currently is a dropdown menu with a list teams with a specific division.

 

<tr><td class='tbl1'>Away: <select name="loser">
<?php
$query3="SELECT sportsdb_teams.teamid, sportsdb_teams.teamname, sportsdb_divs.divname FROM sportsdb_teams, sportsdb_divs WHERE sportsdb_teams.active=1 AND sportsdb_teams.teamdiv = sportsdb_divs.divid AND sportsdb_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'>Score: <input type=\"text\" name=\"ra\" size=\"2\" maxlength=\"2\" value=\"{$score['ra']}\" /></td></tr>\n";
?>

 

Assistance is greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/102240-remove-dropdown/
Share on other sites

try:

 

<tr><td class='tbl1'>Away: 
<?php
$query3="SELECT sportsdb_teams.teamid, sportsdb_teams.teamname, sportsdb_divs.divname FROM sportsdb_teams, sportsdb_divs WHERE sportsdb_teams.active=1 AND sportsdb_teams.teamdiv = sportsdb_divs.divid AND sportsdb_divs.conference = $confid ORDER BY divorder ASC, teamname ASC";
$result3=mysql_query($query3);
$teams = mysql_fetch_array($result3, MYSQL_ASSOC);
	print ">{$teams['teamname']}</option>\n";
print "</td><td bgcolor='#FFFF00'>Score: <input type=\"text\" name=\"ra\" size=\"2\" maxlength=\"2\" value=\"{$score['ra']}\" /></td></tr>\n";
?>

Link to comment
https://forums.phpfreaks.com/topic/102240-remove-dropdown/#findComment-523510
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.