-
Notifications
You must be signed in to change notification settings - Fork 0
/
product_list.php
40 lines (33 loc) · 1.19 KB
/
product_list.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
<?Php
include_once "php/DB/DB_Connection.php";
$conn = DataBaseConnection();
$sql = "SELECT * FROM products";
$result = $conn->query($sql);
foreach($result AS $row){
?>
<div class="col-lg-4 col-md-6 mb-4">
<div class="card h-100">
<a href="#"><img class="card-img-top" src="img/<?=$row['Image']?>" alt=""></a>
<div class="card-body">
<h4 class="card-title">
<a href="#"><?=$row['name']?></a>
</h4>
<h5>$ <?=$row['price']?></h5>
<p class="card-text"><?=$row['details']?></p>
</div>
<div class="card-footer d-flex justify-content-between">
<small class="text-muted">★ ★ ★ ★ ☆</small>
<!--
<form action="php/productInCart.php?pid=<?=$row['Id']?>" method="get">
<div class="form-group">
<input type="submit" class="btn btn-primary form-control" value="Add To Cart">
</div>
<div class="form-group">
<input type="input" class="form-control" placeholder="Quantity..">
</div>
</form> -->
<a href="php/productInCart.php?pid=<?=$row['Id']?>" class="btn btn-primary">Add To Cart</a>
</div>
</div>
</div>
<?php } ?>