|
if (isset($_REQUEST["Pid"]) && $_REQUEST["Pid"]<>""){
if($_REQUEST["qty"]==""){
$qty=1;
}else{
$qty=$_REQUEST["qty"];
}
$qrya = mysql_query("select * from tbl_cart where Pid='".$_REQUEST["Pid"]."' and Size='".$_REQUEST["psize"]."' and Color='".$_REQUEST["pcolor"]."' and SID='".session_id()."'") or die (mysql_error());
if (mysql_num_rows($qrya)>0){
$msg = "Record Already Exists";
header("Location: index.php?module=basket");
}
else
{
$qrys= mysql_query("insert into tbl_cart set Date='".date ("l dS F Y")."', Pid=".$_REQUEST["Pid"].", Color='".$_REQUEST["pcolor"]."', Size='".$_REQUEST["psize"]."', SID='".session_id()."', Qty='".$qty."'") or die (mysql_error());
$msg = "Record Added to Inquiry Basket";
header("Location: index.php?module=basket");
}
}
?>
|
| |
|
|