How to effectively hide Href From a Link in PHP?


This is not possible. A href can’t be hidden from a link. But the files can be rewritten and the request URL can be changed to look like this − name.php/5001

Other than this, a post request can be used in the below way −

<form method="post" action="name.php">
<input type="hidden" name="packageID" value="5001">
<button type="submit">Go</button>
</form>

This will expose a single button in the browser.

Updated on: 06-Apr-2020

539 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements