-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist.php
More file actions
37 lines (32 loc) · 700 Bytes
/
list.php
File metadata and controls
37 lines (32 loc) · 700 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
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Home 17 Pastushenko Gleb</title>
<link type="text/css" rel="stylesheet" href="style.css">
</head>
<body>
<?php
error_reporting(0);
$form_data = array();
$dataBase = new mysqli("localhost", "root", "", "home_17");
$dataBase->set_charset("utf8");
$db_table = $dataBase -> query("SELECT * FROM form_data");
while($db_row = $db_table -> fetch_assoc()) {
$form_data += $db_row;
}
$dataBase->close();
?>
<table>
<tr>
<th>Field name</th>
<th>Field value</th>
</tr>
<?php
foreach ($form_data as $key => $value) {
echo "<tr><td>" . $key . "</td><td>" . $value . "</td></tr>";
}
?>
</table>
</body>
</html>