What is the best way to have a dynamic dropdownlist in PHP and POST selected value
- by mouthpiec
Hi,
I am writing the following in PHP:
i would like to have 2 dropdownlists, where the second one is populated from a mySQL dB according to the choice made on the first dropdown list. Then I would like to use the values of the selected values of the dropdownlist to call another PHP page in which I will generate a db query.
Eg:
List A: Car Manufactures (honda, nissan, etc)
List B: Models (accord, civic, etc)
Then I will have a submit button, to POST the values in another PHP file? (I have the basics of how to perform the above without having a dynamic list, but I tried this with AJAX, but I am having problems to pass the value of the second dropdownlist)
Any tips of how I can perform the above?