-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewFeedback.php
More file actions
42 lines (33 loc) · 1.05 KB
/
viewFeedback.php
File metadata and controls
42 lines (33 loc) · 1.05 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
<?php
session_start();
if (!isset($_SESSION["ShopperID"])) {
// redirect to login page if the session variable shopperid is not set
header ("Location: login.php");
exit;
}
include("mysql_conn.php");
include("feedback.php");
$qry = "SELECT * FROM feedback";
$result = $conn->query($qry);
$MainContent .= "<hr>";
$MainContent .= "<h2 style='text-align:center; margin-bottom:40px; color:#e63232'>Feedbacks</h2>";
$MainContent .= "<div class='container justify-content-md-center'>"; //this is container
while ($row = $result->fetch_array())
{
$subject = $row['Subject'];
$content = $row['Content'];
$rating = $row['Rank'];
// Content
$MainContent .= "<div class='row'>"; //content wrapper
$MainContent .= "<div class='col-10'><b>$subject</b>
<br>
$content
</div>";
$MainContent .= "<div class='col-2 text-center'>$rating out of 5 stars</div>";
$MainContent .= "</div>
<br>"; //end of content wrapper
}
//$conn->close();
$MainContent .= "</div>"; //end of container
include("MasterTemplate.php");
?>