-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeedback.php
More file actions
29 lines (24 loc) · 753 Bytes
/
feedback.php
File metadata and controls
29 lines (24 loc) · 753 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
<?php include 'inc/header.php'; ?>
<?php
$sql = 'SELECT * FROM feedback ORDER BY id DESC';
$result = mysqli_query($conn, $sql);
$feedback = mysqli_fetch_all($result, MYSQLI_ASSOC);
?>
<h1>Past Feedback</h1>
<?php if (empty($feedback)): ?>
<p class="lead mt-3">There is no feedback</p>
<?php endif; ?>
<?php foreach ($feedback as $item): ?>
<div class="card my-3 w-75">
<div class="card-body text-center">
<?php echo ucfirst($item['body']); ?>
<div class="text-secondary mt-2">By <?php echo ucwords($item[
'name'
]); ?> on <?php echo date_format(
date_create($item['date']),
'g:ia \o\n l jS F Y'
); ?></div>
</div>
</div>
<?php endforeach; ?>
<?php include 'inc/footer.php'; ?>