How do I make a drop-down list action handler (on change) with PHP?

Hameem

New member
What I precisely want to do is, I select something from a drop down list and based on that selection something changes in my page. The change could be an execution of a query or something else. I know JSF has action handler to do this. But I'm very new to PHP and I have no idea how to do that in PHP. Any help will be appreciated. Thank you.
 
You don't, you do it with JavaScript.

Here's an example of the HTML you'd use to call a function when a drop down box is changed

<select onchange="doSomething(); ">
<option value="0" >Option 0</option>
<option value="1" >Option 1</option>
<option value="2" >Option 2</option>
</select>
 
Back
Top