Advanced Search

Results 1 to 2 of 2

Thread: Dropdown selection -> second dropdown

  1. #1
    Join Date
    Aug 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Dropdown selection -> second dropdown

    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:

    Code:
    <?php
    		//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,

    SysX

  2. #2
    Join Date
    Aug 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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...
    Last edited by SysX; 12-09-2005 at 05:07 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •