I have an HTML listbox, I want to be able to select any value in that listbox and update a second listbox with a PHP database query based on that selection.
Options I have tried:
-I have tried using JSON. I update the second listbox using Javascript and calling an external PHP script, but the returned PHP value would be an array and that wont convert well with Javascript.
-I am not able to use cookies, so I use HTML Sessions. When you select a value in the first listbox it updates a session value and refreshes the page. Upon reload, the page does a PHP script using the Session value to update the second listbox, but I cant update the HTML Session with the selected value of the first listbox using Javascript by calling onChange="function(); with the first listbox".
Is there any other available options to implement this? Or how can I fix one of these options to make this work?