rayhuang0924
05-04-2007, 08:51 AM
Dear all:
I'd like to ask how to get <select> value via PHP? (not through submit)
for example:
<select name="testPHP">
<option value="entry 1"></option>
<option value="entry 2"></option>
<option value="entry 3"></option>
</select>
I want to add an event handler "onChange" such that every time I change the selected value (not submit yet), I can pass what I selected to another function for further process (query mysql server and etc.).
I know it's quite easy to achieve via javascript (onChange="function(this.value)"), but how to achieve the same effect via PHP?
Thank you very much!
Ray
I'd like to ask how to get <select> value via PHP? (not through submit)
for example:
<select name="testPHP">
<option value="entry 1"></option>
<option value="entry 2"></option>
<option value="entry 3"></option>
</select>
I want to add an event handler "onChange" such that every time I change the selected value (not submit yet), I can pass what I selected to another function for further process (query mysql server and etc.).
I know it's quite easy to achieve via javascript (onChange="function(this.value)"), but how to achieve the same effect via PHP?
Thank you very much!
Ray