Thank you for the reply! I have tinkered a little:
<?php
session_start();
include "connect.php";
if (isset($_GET['id'])){
$product_id = $_GET['id'];
$productquery="SELECT product_Name, Category, Price FROM product WHERE product_ID= $product_id";
$prodresult = mysqli_query($productquery);
while ($row = mysqli_fetch_array($prodresult, MYSQL_NUM)){
echo "<div><p>Name: $row[0]</p><p>Category: $row[1]</p><p>Price: $row[2]</p></div>";
}
echo "<div><a href=\"cart.php?action=add&product=$product_id\">add to basket</a></div>";
echo "fail";
}
mysqli_close($_SESSION['conn']); //close database connection
?>
I now see the link to add to the basket.
I am also having problem with a page showing every product:
$prosql="SELECT product_ID, product_Name, Category, Price, Information FROM product";
$proresult=mysqli_query($_SESSION['conn'], $prosql);
$productcount = mysql_num_rows($proresult); // count the output amount
if ($productcount != 0) {
The above sql is coming back with a result of 0 every time? I'm at a massive brick wall.