Jump to content

alex_ire

New Members
  • Posts

    1
  • Joined

  • Last visited

alex_ire's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am looking for help in the best most efficient way to do the following. I have a web page with a standard HTML table that is populated from data in MySQL using PHP based on the user logged in to the website. The table will show different records per user and will have a small amount of data, say 1-5 rows. What I now want to do is direct the user to a new web page when the user clicks on a row and to pass the ID (from the database) of the row selected to the new page. So a standard master/detail set-up. This I can do with a standard anchor and using $_GET. However, for security concerns with $_GET I would rather not use this method as it is possible for anyone to modify the URL with different IDs and they may then see data I don’t want them to see. I could put some more rigorous authentication in the detail page, but if I were to use the $_POST method there is no need to do that. But how can I use the $_POST method from a table that is dynamically populated with MySQL data? If I assign the unique ID from the data record to the name property of a button in the table, as this is different every time I can’t access this with $_POST in the detail page. I am sure this is a common requirement and I am missing something simple. Any advice on how to build links in a table dynamically populated from MySQL without using the $_GET method would be appreciated. thanks all.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.