Reputation: 125
How can I hide the PHP GET
parameters from a URL?
Here is how the URL looks like
../iar7.php?size1=&size=TURF&R3=R3&txtsize=&txttreadd=&small=&large=&smallsw=&largesw=&smallrc=&largerc=&scc=&lcc=&2t1=&2t2o=&2t3o=&2t1=1.36&2t2=1&2t3=5
I want to show only ../iar7.php
.
Upvotes: 0
Views: 527
Reputation: 476557
As already said before, there are two methods to send data: using GET
(which is encoded in the URL), or using POST
which means the data is sended as additional payload in the HTTP request. You cannot hide the URL parameters from the GET request method, simply because it is the way GET is supposed to work.
You can do this by specifying this in your <form>
tag in the HTML source code:
<form action='the.url.com/path/file.php' method='post'>
<!-- ... -->
</form>
Furthermore I want to add that you have to note that in order to process the data in your PHP file, you will have to call $_POST
instead of $_GET
.
Upvotes: 2
Reputation: 3435
Since you're using a GET
, all your payload will be shown as query params. If you would like to hide them perhaps try using a POST
instead.
You can read up on some of the differences between the methods here.
Upvotes: 8
Reputation: 4045
If you are using forms, your html form would look like this:
<form method='post' action='/someurl'>
...
Upvotes: 2