-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcheckout.php
68 lines (59 loc) · 1.96 KB
/
checkout.php
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
<?php
include 'includes/header.inc.php';
if (!isset($_SESSION['cart'])) {
header("Location:menu.php");
}
?>
<!-- Stays -->
<link rel="stylesheet" href="css/checkout.css">
<?php
if (isset($_GET['status'])) {
$msg = $_GET['status'];
if ($msg = -1) {
echo "<h4 class = 'message'>Woops something went wrong...<br>
Please check your address input</h4>";
}
else if ($msg = -2) {
echo "<h4 class = 'message'>Woops something went wrong...<br>
Please check your email or phone number</h4>";
}
}
?>
<div class="wrap-checkout">
<div class="user-data-container">
<form class="user-data" action="includes/checkout.handle.php" method="post">
<h1>Delivery Details</h1>
<hr>
<div class="add-address">
<input type="text" name="address" placeholder = "Address" required>
<input type="text" name="postc" placeholder = "Postal Code" required>
<input type="text" name="city" placeholder = "City" required>
</div>
<hr>
<div class="add-details">
<input type="text" name="name" placeholder = "Name">
<input type="text" name="email" placeholder = "Email" required>
<input type="text" name="phone" placeholder = "Phone" required>
</div>
<textarea name="remarks" rows="8" cols="74" placeholder = "Remarks"></textarea>
<h3>How will you pay?</h4>
<hr>
<p>options here</p>
<button type="submit" id = "chbtn" name="orderNow">Order Now</button>
<a href="menu.php"><button id = "rtrbtn" type="button" name="button">Back to Cart</button></a>
</form>
</div>
<div class="cart">
<div class="cart-items">
</div>
<div class="action">
<h4 class = "total"><p>Total: </p>
<p class ='checkout'>
</p></h4>
<button id="clear-cart" type="button" name="clr" value = "clr">Clear</button><br>
</div>
</div>
<script src="js/checkout.js"></script>
</div>
</body>
</html>