-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorderList.php
More file actions
48 lines (47 loc) · 1.38 KB
/
orderList.php
File metadata and controls
48 lines (47 loc) · 1.38 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
<?php
require 'admin.php';
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="orderList.css">
<title></title>
</head>
<body>
<table border="3">
<tr>
<th>id</th>
<th>Food ID</th>
<th>Image</th>
<th>Category</th>
<th>Food</th>
<th>Quantity</th>
<th>Total Price</th>
<th>Address</th>
<th>Order by</th>
<th>Order Date</th>
</tr>
<?php
$sql = mysqli_query($conn,"SELECT * FROM seeorders");
if (mysqli_num_rows($sql)>0) {
while ($r = mysqli_fetch_assoc($sql)) {
$img= $r['image'];
echo "<tr>";
echo "<td>".$r['id']."</td>";
echo "<td>".$r['fid']."</td>";
echo "<td><img src='image/$img' height='200' width='200' style='padding:0,margin:1vh 1vw;'></td>";
echo "<td>".$r['category']."</td>";
echo "<td>".$r['food']."</td>";
echo "<td>".$r['quantity']."</td>";
echo "<td>".$r['totalprice']."</td>";
echo "<td>".$r['address']."</td>";
echo "<td>".$r['order_by']."</td>";
echo "<td>".$r['order_at']."</td>";
echo "</tr>";
}
}
?>
</table>
</body>
</html>