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

$user = $_SESSION['client'];
$id2 = $_GET['id'];

 $id = $_POST['productID'];
 $qtr = $_POST['quantity'];
 $price = $_POST['price'];
 $companyID = $_POST['companyID'];

$query=mysql_query("select * from customer where userID='$user'");
$display=mysql_fetch_array($query);

 $no = $display['no'];

$totalPrice = $price * $qtr;

mysql_query("insert into memberaddcart (customerID, productID, companyID, quantity, price, status)
	values('$no','$id','$companyID','$qtr','$price','incart')");

echo "<script language=javascript>window.location='product.php?id=$id2'</script>";


?>