-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtablet.php
More file actions
29 lines (28 loc) · 1.02 KB
/
tablet.php
File metadata and controls
29 lines (28 loc) · 1.02 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
<div class="container">
<h3><u><b>Tablet</b></u></h3>
</div>
<div class="container">
<?php
include_once("connection.php");
$result = pg_query($conn, "SELECT * FROM product Where Cat_ID='C02'");
if (!$result) { //add this check.
die('Invalid query: '.pg_errormessage($conn));
}
while($row = pg_fetch_array($result, NUll, PGSQL_ASSOC)){
?>
<!--Display product-->
<div class="col-sm-3">
<div class="card">
<img src="product-imgs/<?php echo $row['pro_image']?>" style="width:100%">
<h4 class="name"><a
href="?page=productdetail&ma=<?php echo $row['product_id']?>"><?php echo $row['product_name']?></a>
</h4>
<div class="price"><ins>$<?php echo $row['price']?></ins> <del class="oldprice">
$<?php echo $row['oldprice']?></del></div>
<p><button><a href="cartfuntion.php?ma=<?php echo $row['product_id']?>">Add to Cart</a></button></p>
</div>
</div>
<?php
}
?>
</div>