-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
49 lines (44 loc) · 1.2 KB
/
index.php
File metadata and controls
49 lines (44 loc) · 1.2 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
<?php
include 'header.php';
?>
<!-- <nav class="pro">
<ul>
<li><a href="cart.php">Cart</a></li><br>
<li><a href="order_history.php">Order History</a></li><br>
</ul>
</nav> -->
<div id="continer">
<aside class="sidebar">
<ul>
<li><a href="cart.php">Cart</a></li><br>
<li><a href="order_history.php">Order History</a></li><br>
</ul>
</aside>
</div>
<div class="main">
<div class="mbox">
<?php
include 'dbc.php';
$sql="Select * from products";
$result = mysqli_query($conn, $sql);
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
echo '<section>
<div><p>
<form action="product_det.php" method="GET" class="cards">
<img id="imgp" src="'.$row['img'].'"><br>
<input type="hidden" name="id" value="'.$row['id'].'">
<input type="text" name="productname" value="'.$row['productname'].'"readOnly>
<input type="text" name="price" value="'.$row['price'].' SR"readOnly>
<input type="text" name="qty" value="'.$row['qty'].'"readOnly>
<input type="text" name="details" value="'.$row['details'].'"readOnly>
<button type="submit" name="selectProduct" id="open">open</button>
</form>
</p></div>
</section>';
}
?>
</div>
</div>
<?php
include 'footer.php'
?>