-
Notifications
You must be signed in to change notification settings - Fork 2
/
single.php
31 lines (25 loc) · 821 Bytes
/
single.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
<?php
include "frontend/includes/header.php";
if(isset($_REQUEST['id'])){
$id = $_REQUEST['id'];
$sql = "SELECT * FROM posts WHERE status= '1' AND id = '$id'";
$query = mysqli_query($conn,$sql);
}
?>
<div class="container card" style = "margin: 150px;">
<div class="card-body">
<?php foreach($query as $q){?>
<img class="card-img-top" src="uploads/images/<?php echo $q['image'];?>" alt="Card image cap">
<div class="card-title bg-dark text-white">
<h1><?php echo $q['title']?></h1>
</div>
<h6 class="card-subtitle mb-2 text-muted"><?php echo $q['postdate'];?></h6>
<p class="card-text">
<?php echo $q['description'];?>
</p>
<?php } ?>
</div>
</div>
<?php
include "frontend/includes/footer.php";
?><