-
Notifications
You must be signed in to change notification settings - Fork 0
/
billing.php
139 lines (132 loc) · 4.96 KB
/
billing.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Chinese Restaurant</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/styles.css">
<link href='https://fonts.googleapis.com/css?family=Oxygen:400,300,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Lora' rel='stylesheet' type='text/css'>
</head>
<body>
<header>
<nav id="header-nav" class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="pull-left visible-md visible-lg">
<div id="logo-img"></div>
</a>
<div class="navbar-brand">
<a href="index.html"><h1>Chinese Restaurant</h1></a>
<p>
<img src="images/star-k-logo.png" alt="Kosher certification">
<span>Certified</span>
</p>
</div>
<button id="navbarToggle" type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#collapsable-nav" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="collapsable-nav" class="collapse navbar-collapse">
<ul id="nav-list" class="nav navbar-nav navbar-right">
<li class="visible-xs active">
<a href="index.html">
<span class="glyphicon glyphicon-home"></span> Home</a>
</li>
<li>
<a href="menu_categories.html">
<span class="glyphicon glyphicon-cutlery"></span><br class="hidden-xs"> Menu</a>
</li>
<li>
<a href="#">
<span class="glyphicon glyphicon-info-sign"></span><br class="hidden-xs"> About</a>
</li>
<li>
<a href="#">
<span class="glyphicon glyphicon-certificate"></span><br class="hidden-xs"> Awards</a>
</li>
<li id="phone" class="hidden-xs">
<a href="tel:012-345-6789">
<span>012-345-6789</span></a><div>* We Deliver</div>
</li>
</ul><!-- #nav-list -->
</div><!-- .collapse .navbar-collapse -->
</div><!-- .container -->
</nav><!-- #header-nav -->
</header>
<div class="form">
<form action="index.html" method="POST">
<?php
include 'connect.php';
if (isset($_POST['Item_Price'])) {
$food = $_POST['Item_Price'];
$c = count($food);
$price=0.0;
for($i=0;$i<$c;$i++){
$price += $food[$i];
}
} else {
echo "You did not choose a dish.";
}
$conn->close();
?>
<h1 class="form-heading">Your billing amount is:<br></h1>
<h2 class="form-heading"><?php echo $price; ?></h2>
<h3 class="form-heading">Do you want to submit your order?</h3>
<div class="button-div">
<input type="submit" value="submit">
</div>
<div class="button-div">
<button><a href="index.html">NAH!!!</a></button>
</div>
</form>
</div>
<?php
include 'connect.php';
if(!isset($_POST['submit'])){
$pricee=$_POST['price'];
}
$sql = "INSERT INTO Customer_Details (Order_Price)
VALUES ('$price')";
if ($conn->query($sql) === TRUE) {
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
?>
<footer class="panel-footer">
<div class="container">
<div class="row">
<section id="hours" class="col-sm-4">
<span>Hours:</span><br>
Sun-Thurs: 11:15am - 10:00pm<br>
Fri: 11:15am - 2:30pm<br>
Saturday Closed
<hr class="visible-xs">
</section>
<section id="address" class="col-sm-4">
<span>Address:</span><br>
4524 Lorem ipsum Road<br>
Random, MD 111111
<p>* Delivery area within 3-4 miles, with minimum order of Rs.200 plus Rs.30 charge for all deliveries.</p>
<hr class="visible-xs">
</section>
<section id="testimonials" class="col-sm-4">
<p>"The best Chinese restaurant I've been to! And that's saying a lot, since I've been to many!"</p>
<p>"Amazing food! Great service! Couldn't ask for more! I'll be back again and again!"</p>
</section>
</div>
<div class="text-center">© Copyright Chinese Restaurant 2020</div>
</div>
</footer>
<!-- jQuery (Bootstrap JS plugins depend on it) -->
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/script.js"></script>
</body>
</html>