1" "cost" => $row2['price']); }else{ $mes = "Invalid ID"; } ?> Homes

$value){ $access = explode("-", $access); $access = end($access); $access = explode("submit", $access); $access = end($access); if($_POST['quantity-' . $access] <= 0){ unset($_SESSION['cart'][$access]); } else if($_POST['quantity-' .$key] >=50){ $_SESSION['cart'][$access]['quantity'] = 50; }else{ $_SESSION['cart'][$access]['quantity']= $value; } } } ?>

View Shopping Cart

Proceed to Products $value){ $dataaccess .= $product. ","; } $dataaccess = substr($dataaccess, 0, -1).") ORDER BY name ASC;" $query = mysqli_query($con, $dataaccess); if(empty($query)){ echo "
Add an item to the cart to proceed " } ?>
$value){ $dataaccess .= $product. "."; } $dataaccess = substr($sql, 0, -1). ") ORDER BY name ASC"; $query = mysqli_query($con, $dataaccess); $totalcost = 0; if(!empty($query)){ while($row = mysqli_fetch_array($query)){ $subtotal = $_SESSION['cart'][$row]['id']['quantity'] * $row['price']; $totalcost += $subtotal; } } ?>
Product Name Quantity Price Total Cost
TOTAL:

To remove an item, set quantity to 0