-
Notifications
You must be signed in to change notification settings - Fork 0
/
view01.php
37 lines (33 loc) · 843 Bytes
/
view01.php
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
<?php
require("includes/db_connection.php");
?>
<!DOCTYPE html>
<html>
<head>
<title>View list</title>
</head>
<body>
<table border=1>
<tr>
<th align="left" width="200">Timestamp </th>
<th align="left" width="100">High Temp Max</th>
<th align="left" width="100">High Temp Min</th>
<th align="left" width="100">Low Temp Max</th>
<th align="left" width="100">Low Temp Min</th>
</tr>
<?php
$sql = "SELECT * FROM tap_sensor";
$result = $connection1->query($sql);
while ($row = $result->fetch_object()){
echo "<tr>";
echo "<td>" . $row->date_time . "</td>";
echo "<td>" . $row->highTempMax . "</td>";
echo "<td>" . $row->highTempMin . "</td>";
echo "<td>" . $row->lowTempMax . "</td>";
echo "<td>" . $row->lowTempMin . "</td>";
echo "</tr>";
}
?>
<table>
</body>
</html>