-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorderForm.php
More file actions
72 lines (59 loc) · 2.1 KB
/
orderForm.php
File metadata and controls
72 lines (59 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
require 'customer.php';
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="checkout.css">
<title></title>
</head>
<body>
<div class="checkout1">
<div class="cashon" >
<center><h2>CASH ON DELIVERY</h2></center>
<form method="post">
<input type="text" name="address" placeholder="Type Your Address here" required>
<br><br>
<strong>Pay:</strong><?php echo $_SESSION['total1']; ?>
<br><br>
<input type="submit" name="pay" value="Confirm Order" >
</form>
<?php
if (isset($_POST["pay"])) {
$cartid = $_SESSION["id1"];
$user = $_SESSION["vemail"];
$cat =$_SESSION["category1"];
$food=$_SESSION["food1"];
$fid = $_SESSION["fid1"];
$img = $_SESSION["image1"];
$quantity=$_SESSION["count1"];
$address = $_POST["address"];
$total = $_SESSION["total1"];
// echo $total;
// echo $quantity;
//echo $address;
//$sql = mysqli_query($conn,"INSERT INTO order()");
$orders =mysqli_query($conn,"INSERT INTO seeorders(fid,cartid,category,food,quantity,totalprice,address,order_by,image) VALUES('$fid','$cartid','$cat','$food','$quantity','$total','$address','$user','$img')");
header("Location: success.php");
}
?>
</div>
<div class="cashout" style="box-shadow: 1px -13px 338px 15px rgba(135,126,123,0.65);">
<center><h2>CASH OUT DELIVERY</h2></center>
<form method="post">
<input type="textarea" name="address" placeholder="Type Your Address here" required>
<br><br>
<strong>Pay:</strong><?php echo $_SESSION['total1']; ?>
<br><br>
<input type="submit" name="paywith" value="pay $<?php echo$_SESSION['total1'];?> with">
</form>
<?php
if (isset($_POST['paywith'])) {
echo "successfully placed order";
}
?>
</div>
</div>
</body>
</html>