I'm working on an existing PHP page that was coded this way:
There is a list of users with a link next to each user to show the details of that particular user.
The problem is the id of the user is displayed in the url which means any user can just change the id in the url and get information about any other user in our database. Now my first thought was obviously to change GET method to POST method but the problem is the link is forced to display the id, here is the code:
echo " - <a href='example.com/fiche-commercial.php?idCommercial=".$row['id_utilisateur']."&nomClient=' class='linkOut'>show public user details</a>
this is in the CRM side, and in the website side we have :
$idCommercial = $_GET["idCommercial"];
$tabQuestion{'idCommercial'} = $idCommercial;
I changed get method to post method but it didn't fix the issue so i get in the url :
example.com/fiche-commercial.php?idCommercial=22
clients/foo, and you are worried they may look atclients/bar? Could you not restrict access to the profile page to admins and the client foo to onlyclients/foo? Perhaps you could clarify your question.