-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathget_sensor_data.php
More file actions
55 lines (39 loc) · 1.55 KB
/
get_sensor_data.php
File metadata and controls
55 lines (39 loc) · 1.55 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
<?php
include ('connectDB.php');
$sql = "SELECT * FROM `sensor_data`";
$result = $con->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo '<div class="row">
<div class="col-md-12 p-3 pl-5 ml-5">
<h4 class="text-uppercase text-primary">temperature <i class="fas fa-thermometer-three-quarters"></i></h4>
<div class="text-center d-inline">
<div class="row">
<div class="col-md-8">
<input id="temp2" type="text" readonly value="'.$row["temp"].' C" class="rounded-pill form-control white" />
</div>
<div class="col-md-4 pl-0 ml-0">
</div>
</div>
</div>
</div>
</div>
<!-- heart rate -->
<div class="row">
<div class="col-md-12 p-3 pl-5 ml-5">
<h4 class="text-uppercase text-primary">heart rate <i class="fas fa-heartbeat text-danger"></i></h4>
<div class="text-center d-inline">
<div class="row">
<div class="col-md-8">
<input id="bpm2" type="text" readonly value="'.$row["bpm"].' BPM" class="rounded-pill form-control white" />
</div>
<div class="col-md-4 pl-0 ml-0">
</div>
</div>
</div>
</div>
</div>';
}
}
?>