Hi Guys,
I have this piece of code that should basically retrieve the priduct ID and display the producton a different page when clicked.
I must be doing something wrong because I keep getting "nothing selected" even though the product ID is selected(also displayed on the url(www....../productview.php?prodid=1)
<?php
$product_id = $_GET["productID"];
include_once("connect.php");
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if(!isset($product_id))
{
print("No book selected !");
return;
}
$query_products = "SELECT * FROM items WHERE productID = $product_id";
$query_product_result = mysqli_query($db, $query_products)
or die(mysql_error());
$num_rows_products = mysqli_num_rows($query_product_result);
?>