-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcamera.php
More file actions
37 lines (28 loc) · 883 Bytes
/
camera.php
File metadata and controls
37 lines (28 loc) · 883 Bytes
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
<?php
include_once("includes/template_header.php");
?>
<?php require('connect_db.php');
$query = "SELECT * FROM products WHERE category LIKE 'Camera';";
$results = mysqli_query($dbc, $query);
if (mysqli_num_rows($results) > 0)
{
while ( $row = mysqli_fetch_array($results, MYSQLI_ASSOC))
{
echo '<section class="products">
<section class="image"><a href="itemv2.php?id='.$row['id'].' "><img src="images/'.$row['product_image'].'"></a></section>
<h2>'.$row['product_title'].'</h2>
<h3>'.$row['product_details'].'</h3>
<h4>Rs. '.$row['product_price'].'</h4>
<dt class="btn"><h4><a href="addcart.php?id='.$row['id'].'">Add to Cart</a></h4></dt>
</section>';
}
mysqli_close($dbc);
}
else
{
echo '<p>There are currently no items in the shop.</p>';
}
?>
<?php
include_once("includes/template_footer.php");
?>