Jump to content

hide info from browser???


rsammy

Recommended Posts

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:

<php
print("<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

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]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.