I have a web form that contains a drop down box that is populated by a request to a MySQL server with php, and a text box. The value in the text box is currently passed off to another page for processing. This all works fine but as there are a lot of submissions with the same value being passed through I've decided to implement the drop down box within the form to allow a user to select from the options that have been submitted previously.
What I would like is when the user clicks on a value in the drop down box that the value is used to populate the text box in the webform. I'm having trouble pulling this value out. I'm assuming that it requires an onClick/onSelect listener to be implemented but I'm not entirely sure how to do this. Any help would be greatly appreciated!
edit for code, currently I'm just trying to get the value to echo to the page as a proof of concept, but it will eventually need to go into the text box.