return a value to php form

Reply

Join Date: Oct 2006
Posts: 4
Reputation: praseena is an unknown quantity at this point 
Solved Threads: 0
praseena praseena is offline Offline
Newbie Poster

return a value to php form

 
0
  #1
Oct 18th, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 494
Reputation: Puckdropper is an unknown quantity at this point 
Solved Threads: 21
Puckdropper Puckdropper is offline Offline
Posting Pro in Training

Re: return a value to php form

 
0
  #2
Oct 18th, 2006
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.
www.uncreativelabs.net

Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 2815 | Replies: 1
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC