-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFetchPass.php
More file actions
89 lines (79 loc) · 2.51 KB
/
FetchPass.php
File metadata and controls
89 lines (79 loc) · 2.51 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Data</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="styles.css" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<script src="main.js"></script>
</head>
<body>
<div class="message">
<h1>Location Reporting</h1>
<h2>With Hull University</h2>
<ul>
<li><a href="index.html">Home</a></li>
<li><a class="active" href="Fetch.php">Fetch</a></li>
<li><a href="Search.html">Search</a></li>
</ul>
</div>
</body>
</html>
<?php
$dbhost = "localhost";
$dbuser = "appengine";
$dbpass = "Test";
$db = "Bookings";
$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $db);
$Fetch="SELECT * FROM logintable";
$result = mysqli_query($conn, $Fetch);
echo "
<style>
table, th, td
{
border: 4px solid black;
border-collapse: collapse;
}
table{width:100%;}
th, td {
padding: 15px;
}
table tr:nth-child(even) {
background-color: rgba(187, 187, 187, 0.9);
color: black;
}
table tr:nth-child(odd) {
background-color: rgba(255, 255, 255, 0.9);
color: black;
}
table th {
background-color: black;
color: white;
}
</style>
<table>
<tr>
<th>ID</th>
<th>Password</th>
<th>UserType</th>
</tr>";
while ($row = mysqli_fetch_array($result)) {
{
echo "<tr>";
echo "<td>".$row['ID']."</td>";
echo "<td>" . $row['Password']. "</td>";
echo "<td>" . $row['UserType'] . "</td>";
echo "</tr>" ;
}
}
mysqli_free_result($result);
mysqli_close($conn);
?>