I am getting an error when updating a product in the cart.
Notice: Array to string conversion in C:\xampp\htdocs\ecommerce\cart.php on line 109
Line 109 refers to this line in the code below to input that contains this['qty']
the input type of quantity.
<?php
function updatecart(){
global $con;
$ip=getIp();
if(isset($_POST['update_cart'])){
foreach($_POST['remove'] as $remove_id){
$delete_product="delete from cart where p_id='$remove_id' AND ip_add='$ip'";
$run_delete = mysqli_query($con, $delete_product);
if($run_delete){
echo "<script>window.open('cart.php','_self')</script>";
}
}
}
} if(isset($_POST['continue'])){
echo "<script>window.open('index.php','_self')</script>";
}