-
Notifications
You must be signed in to change notification settings - Fork 0
/
orderlist.php
132 lines (118 loc) · 2.12 KB
/
orderlist.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
<?php
include('connection.php');
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>F-pannel</title>
<style>
* {
margin: 0;
padding: 0;
}
.container {
position: relative;
}
.one {
border: 0px solid black;
width: 25%;
height: 100vh;
background: black;
display: flex;
justify-content: center;
align-items: center;
}
.one ul {
list-style: none;
}
.one ul li {
text-align: center;
border: 0px solid black;
height: 50px;
margin: 20px;
width: 200px;
border-radius: 30px;
}
.one ul li a {
text-decoration: none;
font-size: 20px;
color: white;
border: 0px solid black;
width: 200px;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 30px;
transition: background 1s;
transition: transform;
}
.one ul li a:hover {
background: blue;
transform: scale(1.3);
}
.two {
border: 0px solid black;
background: white;
width: 75%;
height: 100vh;
float: left;
position: absolute;
left: 25%;
top: 1px;
display: flex;
align-items: center;
justify-content: center;
}
table {
width: 900px;
padding: 2px;
font-weight: bold;
background: #c8cdca;
}
td {
padding-left: 20px;
}
</style>
</head>
<body>
<div class="container">
<div class="one">
<ul>
<li><a href="cpanel.php">Dash Board</a></li>
<li><a href="additems.php">Add Items</a></li>
<li><a href="orderlist.php">Items List</a></li>
</ul>
</div>
<div class="two">
<table border="two">
<tr>
<?php
$sql = "SELECT * FROM item";
$results = $connection->query($sql);
?>
<th>Item Name</th>
<th>Item Price</th>
</tr>
<?php
if ($results->num_rows > 0) {
while ($result = $results->fetch_assoc()) {
?>
<tr>
<td><?php echo $result['item_name']; ?></td>
<td><?php echo $result['item_price']; ?></td>
</tr>
<?php
}
} else {
echo "O result";
}
?>
</table>
</div>
</div>
</div>
</body>
</html>