Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing through a parameter in a link without making it visible in the URL

Tags:

php

I have a table containing editing links. In the href of the links I am passing a parameter to edit a record, but that parameter passed by $ _GET, is seen in the url, and I do not want that variable to be in the url. Is there any way to pass this value through without it being sent in the URL?

<td>
  <a class="edit btn btn-default btn-sm" href="newsEdi.php?id=<?php echo $fila['id'];?> ">
    <span class="glyphicon glyphicon-edit"></span> Edit
  </a>
</td>
<td>
  <a class="edit btn btn-default btn-sm" href="newsEli.php?id=<?php echo  $fila['id'];?> ">
    <span class="glyphicon glyphicon-edit"></span> Edit
  </a>
</td>

                

like image 798
elizabeth Avatar asked Nov 16 '25 15:11

elizabeth


1 Answers

Use HTTPS, everything except the URL address portion is encrypted. Note however that the entire URL will probably end up in the server logs. If you also want to avoid the server logging send sensitive data as a POST, not a GET.

like image 170
zaph Avatar answered Nov 19 '25 07:11

zaph



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!