> -----Original Message-----
> From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 17, 2007 4:05 PM
> To: Don; php-general@lists.php.net
> Subject: RE: [PHP] dynamic lists
> 
> [snip]
> By dynamic drop list I mean the type where the options 
> contained in the subsequent list depend on what was picked in 
> the previous list without clicking submit. 
> [/snip]
> 
> PHP is server side, you need to do this with AJAX or Javascript
> 
> --
> PHP General Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 

Don,

There's a few different ways to do this.

#1) Submit the form (to itself) when a user chooses an option from the first
list (using onChange=form.submit()) then with PHP query the database for the
second set of options.

#2) Use JavaScript to store all the values and pop them in when the user
chooses an option from the first list (using onChange=someFunction(...)).

I like #2.  If you need a starting point, google for "javascript dynamic
select list"

Hope that helps,

Brad

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to