<?php
include('sessionLogin.php');
include('connect.php');

$user = $_SESSION['client'];
$query=mysql_query("select * from customer where userID='$user'");
$display=mysql_fetch_array($query);
	$no2 = $display["no"];

$no=$_GET['user'];
$code=$_GET['code'];

if($no!=$no2){
	echo"<script language=javascript>window.location='account.php'</script>";
}

mysql_query("delete from memberaddcart where customerID='$no' and productID='$code' and status='incart'");

echo"<script language=javascript>alert('Remove from cart successful');window.location='viewCartForm.php'</script>";


?>