[Solved] How to retrieve the value of selected id from a table or “list” [closed]


The traditional and simplest approach is:

Make your “list” a database table. Add a new row to that table when you want to add a product.

Put the value of the PRIMARY KEY column in the URL, usually in a query string.

http://example.com/products.php?product_id=123

Read that value from $_GET and use it it in a database query to get the information needed to generate the page.

Output the page with that data in it.

Prettier URLs can be achieved with URL rewriting. You might want to look at MVC frameworks which implement routing and convenient methods to define nicer URIs.

solved How to retrieve the value of selected id from a table or “list” [closed]