body>
<form name="wfwd">
<select name="wcode" onChange="disp(document.wfwd)">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>

</select>

<?php
$id=$_get;
echo $id;

?>


</form>
</body>

<script>
function disp(Object)
{
var index=Object.wcode.selectedIndex;
var value=Object.wcode.options[index].value;
var item=Object.wcode.options[index].text;
document.wfwd.action='worksfwdtogovt.php?id=item';
document.wfwd.submit();
}//disp

can i return the value of item into the form using this javascript.
i want to echo the value of id in form.pls help me


Last edited by praseena : Yesterday at 11:13 am.

To get PHP to echo the data, you need to reload the page. PHP is the PHP Hypertext PREPROCESSOR, which means PHP is invoked before the page is displayed.

Please at least take the time to spell out "please". "pls" could mean too many different things to be useful as an abbreviation.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.