php – Getting error when i try to get id of product-ThrowExceptions

Exception or error:

i want to get id of details page but getting error when i try to get id of product details page. i am using php and sql

error: Notice: Undefined variable: row in
C:\xampp\htdocs\ipo\details.php on line 64

  include 'header.php';
  include 'navbarmain.php';
  $count = 0;
  $id = $_GET["id"];
  if (isset($id)) {
    $mysqli = mysqli_query($connection,"SELECT * FROM products WHERE id = $id");

    foreach($mysqli as $row){

    if($count == 0) { // three items in a row
        $count = 0;
How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *