944,038 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 4456
  • PHP RSS
Oct 18th, 2006
0

return a value to php form

Expand Post »
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['id'];
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
praseena is offline Offline
4 posts
since Oct 2006
Oct 18th, 2006
0

Re: return a value to php form

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.
Reputation Points: 23
Solved Threads: 23
Posting Pro in Training
Puckdropper is offline Offline
494 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: data output
Next Thread in PHP Forum Timeline: I NEED HELP PLEASE:Warning: mysql_num_rows():





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC