I have MySQL table with 4 rows ( id, name, age, tel ) and I want on the first page to dosplay all NAMEs and once a user click on one of the name to go to different page showing NAME and AGE (using the id row) and a button to third page showing NAME AGE TEL. I know it is using sessions but I don’t exactly how to write it
Share
You can make use of $_GET.
In your first page create a link to the the second page with an url like:
Where
1is the id of that particular row.Then In your second page you can get this id from the url using $_GET[‘id’].
Then retrieve the row with this id value; do a MySQL query to retrieve the values to be shown.
Do the same for the third page.