-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex11.php
More file actions
98 lines (85 loc) · 2.01 KB
/
index11.php
File metadata and controls
98 lines (85 loc) · 2.01 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
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
<?php
include 'header.php'
?>
<link rel="stylesheet" type="text/css" href="style1.css">
<br>
<?php
// if (isset($_SESSION['username'])){
// echo $_SESSION['username'];
// } else {
// echo "You are not logged in.";
// }
?>
<br>
<h1>Users</h1>
<div id="mytablediv">
<table id="mytable" class="table" border="1" cellpadding="1" cellspacing="2">
<thead>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
<th>Email</th>
<th>Password</th>
<th>Created time</th>
</tr>
</thead>
<tbody>
<?php
include 'dbc.php';
$sql="Select * from users";
$result = mysqli_query($conn, $sql);
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
echo '<tr>';
echo '<td>'.$row['id'].'</td>';
echo '<td>'.$row['firstname'].'</td>';
echo '<td>'.$row['lastname'].'</td>';
echo '<td>'.$row['username'].'</td>';
echo '<td>'.$row['email'].'</td>';
echo '<td>'.$row['password'].'</td>';
echo '<td>'.$row['createdtime'].'</td>'.'<br>';
}
?>
</tbody>
</table>
</div>
<br>
<h1>Products</h1>
<br>
<div id="myProduct">
<table id="myproducttable" class="producttable" border="1" cellpadding="1" cellspacing="2">
<thead>
<tr>
<th>ID</th>
<th>Product Name</th>
<th>Price</th>
<th>QTY</th>
<th>Details</th>
<th>Created time</th>
<th>Image</th>
</tr>
</thead>
<tbody>
<!--<img src="$row['img']" alt="$row['productname']" style="width:200px;height:200px;">-->
<?php
include 'dbc.php';
$sql="Select * from products";
$result = mysqli_query($conn, $sql);
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
echo '<tr>';
echo '<td>'.$row['id'].'</td>';
echo '<td>'.$row['productname'].'</td>';
echo '<td>'.$row['price']. ' SR'.'</td>';
echo '<td>'.$row['qty'].'</td>';
echo '<td>'.$row['details'].'</td>';
echo '<td>'.$row['currenttime'].'</td>'.'<br>';
echo '<td>'.'<img src="'.$row['img'].'"'.'style="width:100px;height=100px;">'.'</td>'.'<br>';
}
?>
</tbody>
</table>
</div>
<?php
include 'footer.php'
?>