waqarnaeem Posted September 21, 2009 Share Posted September 21, 2009 I am new in php problem is that ,i have a table having 3 coloums ,id,firstname,lastname, & 3 textboxes 1st at page fetch.php user give an id & after submitting the values of the row are retrieved at the 3 textboxes. ,now I want to update by changing the values of Tboxes. here is a code of page fetch.php. <script language="javascript" type="text/javascript"> var httpobject=null; function call(x,y,z) { // document.write(x,y,z); httpobject=getHTTPObject(); if(httpobject!=null) { var url=("up.php?x="+x+"&y="+y+"&z="+z); //document.write(url); httpobject.open("GET", url ,true); httpobject.send(null) httpobject.onreadystatechange=setoutput; } } function setoutput() { if(httpobject.readystate==4) { document.write(httpobject.responseText); } } function getHTTPObject() { if (window.ActiveXObject) {return new ActiveXObject("Microsoft.XMLHTTP");} else { alert("Your browser does not support AJAX."); return null; }} </script> <?php .... ... ... .... ....here is the retrieving code which take an id # & give the records in below textboxes,from there i want to getting the values at up.php .... ..... .... echo "<input type='text' name='one' value= '$aaa'/>"; echo "<input type='text' name='y' value= '$aa' />"; echo "<input type='text' name='z' value= '$bb'/>"; echo "<input type='button' onclick=\"call($aaa,'$aa','$bb')\" value= 'updatenow' />"; problem is that i cant able to get the new values of textboxes after changing in textboxes, i am getting the old values . what is the problem here? Link to comment https://forums.phpfreaks.com/topic/175032-cant-able-to-get-new-values-after-changed-at-another-page-at-onclick-button/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.