-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex22.php
More file actions
45 lines (38 loc) · 1.16 KB
/
index22.php
File metadata and controls
45 lines (38 loc) · 1.16 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
<?php
include 'header.php'
?>
<link rel="stylesheet" type="text/css" href="style3.css">
<h1>Products</h1>
<?php
include 'nav.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="myProduct">
<?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="product-box">
<img id="imgp" src="'.$row['img'].'"><br>
<input type="hidden" name="id" value="'.$row['id'].'">
<h5>Name:</h5><input type="text" name="productname" value="'.$row['productname'].'"readOnly>
<h5>Price:</h5><input type="text" name="price" value="'.$row['price'].' SR"readOnly>
<h5>QTY:</h5><input type="text" name="qty" value="'.$row['qty'].'"readOnly>
<h5>Details:</h5><input type="text" name="details" value="'.$row['details'].'"readOnly>
<button type="submit" name="selectProduct" id="open">open</button>
</form>
</p></div>
</section>';
}
?>
<?php
include 'footer.php'
?>