Am trying to populate options items of a dropdown based on the value that was selected from another dropdown. Example am working on a car site and when the users select a brand of car another dropdown load only the models of the particular brand of car that was selected…
Thanks for your reply, but i want to populate everything from database
You select the options (all of them) from the database and write them out as JS arrays (or json).
The interactivity can then happen on the client - how practical this is depends on how many options have the potential to be displayed.
You could also divide some of this work up using Ajax.
thanks for the reply.
I know this is a little last decade, but you could simply reload the page with each selection. That would allow you to use PHP to populate the next list based on the previous choice.