rsammy Posted January 11, 2007 Share Posted January 11, 2007 is there a way to hide the info being posted between pages via a GET. what i mean is, when i am posting variables in a code like this:<phpprint("<input class='sbttn' type='submit' name='action' value='Remove from Billing Batch' onClick=\"location.href='billingMgtList.php?approval=$requestforApproval&select=$select&select1=$select1&select2=$select2&m1=$m1&d1=$d1&y1=$y1&m2=$m2&d2=$d2&y2=$y2&client_id=$client_id&tran_id=$visit_palm_db_id'\"> ");?>when i do this in one page and receive these variables in another page using GET, the browser shows all the values being passed like this:http://www.abcxyz.com/OM/billingMgtList.php?[b]approval=Yes&select=DESC&select1=ICN&select2=visit_date%20DESC,%20visit_time&m1=&d1=&y1=&m2=&d2=&y2=&client_id=1&tran_id=1503251[/b]is there a way to hide the portion in bold from showing up on the browser address bar? Link to comment https://forums.phpfreaks.com/topic/33759-hide-info-from-browser/ Share on other sites More sharing options...
trq Posted January 11, 2007 Share Posted January 11, 2007 Use post. Link to comment https://forums.phpfreaks.com/topic/33759-hide-info-from-browser/#findComment-158291 Share on other sites More sharing options...
rsammy Posted January 11, 2007 Author Share Posted January 11, 2007 no other way other than post? how can i use POST with the code i used? Link to comment https://forums.phpfreaks.com/topic/33759-hide-info-from-browser/#findComment-158337 Share on other sites More sharing options...
redbullmarky Posted January 11, 2007 Share Posted January 11, 2007 the code you provided is a little sketchy, but basically it's down to the way you set up your <form> . you need to set the form's action to 'method="post"' and some of the variables here (the ones you want hidden):[code]approval=Yes&select=DESC&select1=ICN&select2=visit_date%20DESC,%20visit_time&m1=&d1=&y1=&m2=&d2=&y2=&client_id=1&tran_id=1503251[/code]would all be replaced with a hidden field. however, a Right Click/View Source would show up the info, so obviously dont put sensitive stuff here.then, you can safely change the 'action' of the form to simply '/billingMgtList.php' instead of using an onClick even on your submit button.[code]<form name="myform" method="post" action="/billingMgtList.php"><input type = "hidden" name="approval" value="Yes" />...etc......etc......etc...<input type="submit" name="action" class="sbttn" /></form>[/code] Link to comment https://forums.phpfreaks.com/topic/33759-hide-info-from-browser/#findComment-158373 Share on other sites More sharing options...
rsammy Posted January 11, 2007 Author Share Posted January 11, 2007 thank you! Link to comment https://forums.phpfreaks.com/topic/33759-hide-info-from-browser/#findComment-158458 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.