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)


          $product_id = $_GET["productID"];

if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);

              print("No book selected !");
$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);

You have prodid in your url. You are getting productID though in your code.

Your welcome, a nice easy one for a change!