Hi,
I wonder if someone can help. I'm currently developing a simple script that takes the inputs of an html form and submits them to a table within a MySQL DB.
As there are 30 fields to complete, when I want to view the latest submissions, I have created a script to view the first 5 fields in a pretty html table, which is looping and that's all working fine.
However, I want to be able to click a link next to each record which will then display the entire contents of that particular record. Now I know how to output all the fields within the table, but how do I dynamically link to it? The link I use is:
<a href=\"expand.php?id=$id\">Full Details</a>
...which is causing each link to pick up the id of the corresponding record correctly. Fine. But how will I get expand.php?id=1 to know to call row 1, expand.php?id=2 to call row 2 and so on within expand.php and print it?
I would select the table like so: SELECT * FROM mytable... but then how do I select the correct ID, and moreover, how do I tell a PHP script to select the ID dynamically, depending on what $id is clicked?
Any help would be greatly appreciated.
Jonathen