store selected HTML drop down list item in PHP variable without form submission


I am populating a drop down list from a database using PHP/MYSQL. I got this to work no problem. This is where the headache sets in:

I want to be able to select one of those items in the drop down list and it dynamically populates two other input fields below. Example: The drop down list is a list of lockers. These lockers have other attributes such as combination and section.
I want to select one of the locker numbers and it shows me the combination and section based upon selection. I already have the data sitting in a query…

So my problem is checking whether or not an item is selected dynamically without doing a form submission. Can this be done with PHP?

you’ll need to use js to do that. its not possible with straight php since there’s no submit button.

Sponsor our Newsletter | Privacy Policy | Terms of Service