Menu
Hi experts,
I want get the selected text from a drop down box and store the value to a php value, tried this but its not working:
[code=php]<html>
<head>
<script type=”text/JavaScript”>
function jsfunc(x)
{
<?PHP
$y=print(“document.abc.mylist.options[x].text”);
echo (“Value is = “.$y);
?>
}
</script>
</head>
<body>
<form name=”abc” action=”get”>
<p><select size=”1″ name=mylist id=”D1″ onchange=”jsfunc(this.selectedIndex)”>
<option>Value 1</option>
<option>Value 2</option>
<option>Value 3</option>
</select></p>
</form>
</body>
</html>
Please help.