%PDF- %PDF- document.location ='checkout.php'; "; endif; //Order details if(isset($_POST['submit'])) { $orderno= mt_rand(100000000,999999999); $userid=$_SESSION['id']; $address=$_SESSION['address']; $totalamount=$_SESSION['gtotal']; $txntype=$_POST['paymenttype']; $txnno=$_POST['txnnumber']; $query=mysqli_query($con,"insert into orders(orderNumber,userId,addressId,totalAmount,txnType,txnNumber) values('$orderno','$userid','$address','$totalamount','$txntype','$txnno')"); if($query) { $sql="insert into ordersdetails (userId,productId,quantity) select userID,productId,productQty from cart where userID='$userid';"; $sql.="update ordersdetails set orderNumber='$orderno' where userId='$userid' and orderNumber is null;"; $sql.="delete from cart where userID='$userid'"; $result = mysqli_multi_query($con, $sql); if ($query) { unset($_SESSION['address']); unset($_SESSION['gtotal']); echo ''; echo ""; } } else{ echo ""; echo ""; } } ?> Shopping | Payment

Payment

Total Payment
Payment Type
Transaction Number