In productinfo.php find the echo line inside the while loop.  Just after the existing </a> closing tag but still before the </li> add another hyperlink (a element):The link to delete products

  1. make the href value deleteproduct.php?product=$productID
  2. as the text for the link put a space then brackets with the word Delete, an X or a small image representing delete inside

Load the page and you should be able to hover over the new link and see the $_GET data.

Create a new and completely empty page called deleteproduct.php and then:

  1. add a PHP block to contain the rest of the code
  2. include the functions.php page so that the database connection is set up
  3. extract the $_GET data (remember mysqli_real_escape_string()) and use it to create a DELETE query to delete just that one record
  4. test the page by deleting any products you added using insertproducts.php
  5. once you are sure it is working add a single line of PHP just after the query is run which says header("location:productinfo.php");

The last line will only work if there is no HTML or other output on the page.