I have gone through some of the suggested solution to this issue, but none seems to give me what I wanted. I want a simplest way of populating three dropdown list , in which selection 1 determines the output of dropdown 2, which invariably determines the output of dropdown list 3. Pls, I need a simple php way of achieving this.
Asked
Active
Viewed 746 times
-1
-
possible duplicate of [Drop-down box dependent on the option selected in another drop-down box](http://stackoverflow.com/questions/19728666/drop-down-box-dependent-on-the-option-selected-in-another-drop-down-box) – Sam Hanley Nov 11 '14 at 14:23
1 Answers
1
It probably makes more sense to do this with ajax and JavaScript...
The usual process goes:
User selects first item... Page requests matching second drop-down options from server, and adds them to the <select> using JavaScript.
User selects a second item... Page requests matching third drop-down options from the server. Populates <select> via JavaScript.
Otherwise you will have to send the entire form incomplete to the server and refresh the entire page for each step until it's done. You could write a php-only way to do this, but unless you have a very specific requirement, you will be dragging down the average speed of the internet for no good reason.

Tim Ogilvy
- 1,923
- 1
- 24
- 36
-
http://daveismyname.com/demos/autocomplete/ is also handy... obviously you are using the info to populate the next box inline etc. – Tim Ogilvy Nov 11 '14 at 15:04
-
I am yet to get a suitable solution to the above. If anyone has a simple ones that can fit into the above question, it will be appreciated – David Mukoro Nov 12 '14 at 14:58
-
1You are kind of asking someone to do your job for you... you could always put it up on ODesk and ask someone to solve it for money. – Tim Ogilvy Nov 13 '14 at 03:35