I'm not sure how to explain it properly or what to search for so sorry if this is a duplicate.
I have a page www.site.com/profile
that will display the profile of different people. On that page is a form
with a select
and a submit button
. The select
has a dropdown list of people to choose from, and when the submit button
is clicked, the page is reloaded with the chosen persons details. The information is sent via POST.
What I want to be able to do is go to www.site.com/profile/Barry%20Crouch
, which will load the www.site.com/profile
page with Barry Crouch
as the POST data. So whatever name comes after the last slash is used as the selected players name.
I want this so I can link someone to the page and have the details of the person I am trying to show them displayed. Of course if the name is not in the list no details would be displayed, and I am using PDO prepared statements to prevent SQL injections.