-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategory_items.php
More file actions
49 lines (47 loc) Β· 1.23 KB
/
category_items.php
File metadata and controls
49 lines (47 loc) Β· 1.23 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
46
47
48
49
<!-- start header -->
<?php
$pageTitle = "Category";
include "./components/header.php";
?>
<!-- end header -->
<!-- category section -->
<section class="category_section layout_padding">
<div class="container">
<div class="heading_container">
<h2>
Category
</h2>
</div>
<div class="category_container">
<?php
require "./database/database.php";
$itemsList = "SELECT * FROM category;";
$items = mysqli_query($conn, $itemsList);
if ($items->num_rows > 0) {
foreach ($items as $item) {
echo '<div class="box">
<div class="img-box mb-3">
<a href="threads.php?id=' . $item['id'] . '">
<img src="./static/images/' . $item['image'] . '" alt="" height="130" width="130">
</a>
</div>
<div class="detail-box">
<a href="threads.php?id=' . $item['id'] . '" style="color:white;"><h5>
' . $item['heading'] . '
</h5></a>
</div>
</div>';
}
}
?>
</div>
</div>
</div>
</div>
</section>
<!-- end category section -->
<!-- start footer -->
<?php
include "./components/footer.php";
?>
<!-- end footer -->