Jump to content

instant change when select selectmenu


GRooVeZ

Recommended Posts

hi guys

 

i made a ranking for my league,

u can choose different rankings in multiple games and gamemodes

 

http://www.acidleague.com/League/ffarankings.php

 

now u have a select menu for the game, and then the gamemode

the select of the mode, contains all the modes for all games

 

what i want is, u fist select the game, and then u instantly get a dropdown with the modes correspondeding to that game

 

how do i even start with this?

 

my select menus are built like this

 

	$types=mysql_query("SELECT id,name FROM ffa_types");

while(list($id,$name)=mysql_fetch_row($types)){if ($id == $typeholder)

{

$typelist.="<option selected value='$id'>$name</option>\n";

}

else

{

$typelist.="<option value='$id'>$name</option>\n";

}}

$games=mysql_query("SELECT id,name FROM ffa_games");

while(list($id,$name)=mysql_fetch_row($games)){if ($id == $gameholder)

{

$gamelist.="<option selected value='$id'>$name</option>\n";

}

else

{

$gamelist.="<option value='$id'>$name</option>\n";

}

}

 

 

<form action='ffagamerankings.php' method='post'>

<select name='game'><option>Choose Game ...</option>$gamelist</select>

<select name='type'><option>Choose GameType ...</option>$typelist</select>

 

<input type='submit' value='Ranks' />[code=php:0]

 

 

Link to comment
https://forums.phpfreaks.com/topic/261287-instant-change-when-select-selectmenu/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.