Re: Dynamic Drop Down Box

From: Date: Wed, 06 Mar 2002 15:02:28 +0000
Subject: Re: Dynamic Drop Down Box
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-17508@lists.php.net to get a copy of this message
So, if the user selects "mercedes", then the next box is "500Sl, 300Sc" and so forth. If they select ford, then the second box has completely different values? You'll either have to reload the page after the first select, or use javascript or some other kind of client script. I don't think there is a way to do it with PHP, but maybe someone else has an idea to help you. I hope they do, because I need to do the same sort of thing, and I am trying to avoid js at all costs. "Randy Rankin" <randy.rankin@invensys.com> wrote in message news:F3BF649E168BD411A1B700010271F38BB4BD20@SBMAIL... > 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 (#17508) next »