How can I display the selected value of the option using PHP?
For example I have this code:
<script language=javascript>
function sevent()
{
var xx = document.xx.sbox;
if(document.xx.sbox.selectedIndex != 0)
alert("selected is "+xx.selectedIndex);
else alert("None is selected");
}
</script>
<form name=xx>
<select name=sbox onChange="sevent()">
<option value="default">Select Option</option>
<option value="option 1">option 1</option>
<option value="option 2">option 2</option>
</select>
</form>
Here, it prompts whatever option you select. What I wanted to do is to display
the value of the selected option using PHP. How can do it?
Thanks. ^_^
Show replies by date