title: PHP: How to view product details in a separate page without having to create a new file for each product?
body: <p>So I've created a market place page that lists all products from a database. They each have buttons to view their details (price, description, etc.) but I don't know how to let the user view the details without creating a new php page for each product. </p>
  
  <p>I've tried using <code>$_GET</code> (for example, the url would read <code>www.websitename.com/page.php?productname=name</code>), but as I need to pass variable for prices as well, I can't use <code>GET</code> or a user could modify prices within the url. I've also tried using <code>POST</code>, but I would like the user to be able to bookmark or refresh the page without the variables clearing. I've tried setting <code>$_SESSION</code> variables for things like prices to avoid this issue, but as the session variables are still inevitably defined by <code>POST</code> or <code>GET</code>, I still run into both issues listed previously.</p>
  
  <p>I've also tried using <code>SQL queries</code> so that the prices are received on demand from a database when the page (<code>viewproduct.php</code>) is loaded, and it searches for the product name that matches the <code>$_GET['name']</code> variable, but the products are stored by category in different tables, and I can't check against all tables because they don't have equal dimensions.</p>
  
  <p>So my question is simple: what is the standard for doing something like this? How can I write php code so that a user can bookmark or refresh a page with product information, without being able to edit any of the variables, and without me having to create a file for each and every product?</p>
  
  <p>Thanks in advance!</p>