-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManageFeedback.php
More file actions
68 lines (60 loc) · 1.5 KB
/
Copy pathManageFeedback.php
File metadata and controls
68 lines (60 loc) · 1.5 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
include_once 'lib/ShoppingCart.php';
include_once 'lib/DBHelper.php';
$dbh = new DBHelper();
?>
<html>
<head>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 80%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
tr:nth-child(even) {
background-color: #dddddd;
}
</style>
<link rel="stylesheet" href="roncabeanz_style.css" type="text/css" />
<link href="css/Header.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php session_start(); ?>
<?php $_SESSION['ref'] = $_SERVER['SCRIPT_NAME']; ?>
<div class="container">
<?php include 'Header.php'; ?>
</div>
<div class="row"></div>
<h1>Beanz Customer Feedback</h1>
<?php
//Step2
$query = "SELECT firstName, lastName, email, comments FROM CustomerContactRequests WHERE 1 ORDER BY lastname, firstName";
$result = $dbh->query($query);
$num_fields = mysqli_num_fields($result);
$fields = mysqli_fetch_fields($result);
//$row = mysqli_fetch_array($result);
?>
<table>
<tr>
<?php for ($i = 0; $i < $num_fields; $i++){ ?>
<th><?php echo $fields[$i]->name;?></th>
<?php } ?>
</tr>
<?php while ($row = mysqli_fetch_array($result)) {?>
<tr>
<?php for ($i = 0; $i < $num_fields; $i++){?>
<td><?php echo $row[$fields[$i]->name] ?></td>
<?php } ?> </tr>
<?php } ?>
</table>
<?php
//Step 4
$dbh->close();
?>
</body>
</html>