Create multiple select boxes on the fly depending on selections
Posted on 2012-09-19
I want to create multiple selection boxes to filter a search based on information I have in a database.
Basically id, classification, subclassification1, subclassification2, subclassification3, subclassification4, subclassification5
Example One option in classification could be "birds", when this is selected I want to populate select box 2 with all of the items in subclassification1 where classification is "birds"
One subclassification1 of "birds" could be "ducks" for example so then, I want to populate select box 3 with all of the items in subclassification2 where subclassification1 is "ducks" and so on.
Some will end there, others may go on over all subclassifications
I'm using PHP and MySQL but would like this to be quite fluid so AJAX or jQuery would be great.
Many thanks in advance.