View Full Version : Dropdown selection -> second dropdown

11-21-2005, 06:02 AM
Does anyone know of a way to execute an if (isset([])) function from a selection in a drpodown menu?

I have a dropdown menu that diaplays items from a database:

//Create dropdown criteria for relationship sub-category
$values = array ( );
$labels = array ( );
$query = "SELECT swcontti_id, descr FROM swcontti ORDER BY descr";
$result = $conn->issue_query ($query);
if ($result)
while (list ($swcontti_id, $descr) = mysql_fetch_row ($result))
$values[] = $swcontti_id;
$labels[] = $descr;

//Print SQL query results
print (make_popup_menu ("swcontti", $values, $labels, ""));

I would like to be able to show a second dropdown from the selection of one item from this dropdown (swcontti).

Can anyone help me please?

Kind regards,


12-09-2005, 06:04 AM
The answer to this is you can't use anything in PHP that's like on select as it's serverside but you can do the obvious alternative:

Have a dropdown that if X is selected produce table X if
Y is selected produce Y, or create tabs instead...