RE: [PHP-DB] Dynamic Drop Down Box

From: Date: Tue, 05 Mar 2002 20:34:24 +0000
Subject: RE: [PHP-DB] Dynamic Drop Down Box
Groups: php.db 
Request: Send a blank email to php-db+get-17489@lists.php.net to get a copy of this message
This can be done with JavaScript - I don't know if you can do it in PHP. I had a site where I wanted to let people compare data for two states so based on the first state that was chosen I populated the compare with the other states. If you want me to send you my code I can. It uses another file too - that one is a big JS array with all of the states in it. I also do one that populates a county box based upon a state. -Natalie > -----Original Message----- > From: Rankin, Randy [SMTP:randy.rankin@invensys.com] > Sent: Tuesday, March 05, 2002 3:32 PM > To: php-db@lists.php.net > Subject: [PHP-DB] Dynamic Drop Down Box > > Does anyone know how I might populate a drop down box based on the users > selection from a previous drop down box? For example, if I have a table > called 'autos' with 2 fields, 'make' and 'model'. I select > distinct 'make' > and populate the first drop down box. Based on the user selection, the 2nd > drop down box would be populated with the distinct 'make' for that model > (ie; if the user selects Ford in the first drop down, the 2nd drop down > would be populated with Explorer, Expedition, Ranger, etc.). > > Thanks, > > Randy Rankin

« previous php.db (#17489) next »