-
Notifications
You must be signed in to change notification settings - Fork 0
/
gallery.php
executable file
·50 lines (38 loc) · 1.36 KB
/
gallery.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
41
42
43
44
45
46
47
48
49
50
<?php
include('header.php');
//including the database connection file
include_once("config/connection.php");
//fetching data in descending order (lastest entry first)
$result = mysqli_query($mysqli, " SELECT * FROM products WHERE status = 1 ORDER BY id DESC");
?>
<!-- Marketing messaging and featurettes
================================================== -->
<!-- Wrap the rest of the page in another container to center all the content. -->
<div class="container marketing">
<!-- START THE FEATURETTES -->
<hr class="featurette-divider">
<!-- Three columns of text below the carousel -->
<div class="row">
<?php
while ($res = mysqli_fetch_array($result)) {
$img_src = "backend/uploads/default_images/1.jpg";
if ($res['image'] != "") {
$img_src = 'backend/uploads/' . $res['image'];
}
?>
<div class="col-lg-4">
<a href="product_detail.php?id=<?php echo $res['id']; ?>">
<img class="img-responsive" src="<?php echo $img_src; ?>" width="100%" height="60%">
<h6> <?php echo $res['name']; ?></h6>
</a>
</div>
<?php
}
?>
</div><!-- /.row -->
<hr class="featurette-divider">
<!-- /END THE FEATURETTES -->
</div><!-- /.container -->
<?php
include('footer.php');
?>