<?php
  include('session.php');
?>
		    <?php
include"config.php";

$product_id=$_POST['product_id'];
$cart_size=$_POST['cart_size'];
$cart_id=$_POST['cart_id'];
$cashier_name="juma";
//$product_amount=$product_price * $cart_size;
//$sql="INSERT INTO `cart`(`cart_id`, `product_name`,`product_price`,`cart_size`,`product_amount`,`cashier_name`) VALUES ('','$product_name','$product_price','$product_amount','$cart_size','$product_amount','$cashier_name')";
$sql_update="update product set product_size=product_size+$cart_size where product_id=$product_id";
$sql="DELETE FROM cart WHERE cart_id='$cart_id'";
$result=mysqli_query($conn,$sql);
$result1=mysqli_query($conn,$sql_update);
if($result=true)
{
	header("location:pos.php");
}

mysqli_close($conn);
?>