Php – How to hide PHP URL link in CSS


Is it possible to hide the URL link that I use in php in order not to show to user to prevent user to change the URL link? And I'm using get function on another php page to retrieve the package ID.

Example I have a php URL code like this:

<a href="banner.php?packageID=1234" >

When user click on the link and lead to the URL, is that possible to hide the "1234" and just show banner.php?packageID= on the URL link only?

Please guide me through this. Thanks

Best Solution

No, it isn't possible. However, you can use rewrite rules to change the request URL such that it looks something like: banner.php/1234

A different approach would be to use a post request with a form, like so:

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

In this case, only the button is visible. The button can be styled like a link,