<?php
	include'connection.php';
	
	$userid = $_GET['userid'];
	$PCode = $_GET['PCode'];
	$rate = $_GET['amt'];
	$qty = $_GET['qty'];
	$dis = $_GET['dis'];
	
	$TotAmt=$rate*$qty;
	$DisAmt=$TotAmt*$dis/100;
	$NetAmt=$TotAmt-$DisAmt;
	
	$quAddCart="INSERT INTO cart(Date,Userid,PCode,Rate,Quantity,Amount,Discount,NetAmount)VALUES('$date','$userid','$PCode','$rate','$qty','$TotAmt','$dis','$NetAmt')";
	mysqli_query($con,$quAddCart);

?>