Re: Menu populated based on previous menu

From: Date: Tue, 28 Oct 2003 15:53:11 +0000
Subject: Re: Menu populated based on previous menu
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167884@lists.php.net to get a copy of this message
Searched all the sites I could find for this problem to no avail. I have two dropdown menus in a form. The first menu contains a list of MANUFACTURERS obtained from a database. The second contains a list of MODELS also obtained from the database. I want the second menu to be populated based upon the selection in the first. In other words, once a visitor has selected a MANUFACTURER they'll be presented with a list of MODELS that are available from the selected MANUFACTURER. I know how to do the queries, but don't know how to initiate the query and rebuild the second menu when the first selection is made without adding a SUBMIT button and loading a second page.
You can't do this with PHP (server-side), you'll need to use JavaScript (client-side). Check out some JavaScript sites for examples, then use PHP to populate the JavaScript arrays. Larry

« previous php.general (#167884) next »