View Full Version : Combo Box

03-02-2003, 06:52 PM
I have two combo boxes in the same page, if i choose an item from the first one, the second one (combo box) should add that item that i chose from the frist one...
how can i do that with php?

03-02-2003, 07:34 PM
Sure you wanna do it that way? Be much easier using javascript. To get new values in the other drop down, you'd have to have the page reresh once the user has chosen a value from the first select.

03-02-2003, 08:55 PM
As nightfire suggested this can be done with javascript.

Advantages to using javascript: don't have to reload page
Disadvantages to using javascript: not reliable as people can disable javascript

Advantages to using PHP: can populate options from database, more reliable
Disadvantages: have to reload page