Re: Re: Dynamic Drop Down Box
| From: | fls | Date: | Wed, 06 Mar 2002 18:14:59 +0000 |
| Subject: | Re: Re: Dynamic Drop Down Box | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17520@lists.php.net to get a copy of this message | ||
I've got a dynamic dropdown on http://www.northjerseydirectories.com
I generate the js using php and a MySQL database. The dropdown does what
you're looking for. Since the dropdown is client side you either need to
go with javascript, an applet, or have the person submit a form that loads
the second box which is pretty clumsy.
Fred Steinkopf
On Wed, 6 Mar 2002, Aron Pilhofer wrote:
> 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
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>