-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinsertareg.php
40 lines (39 loc) · 956 Bytes
/
insertareg.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
38
39
<html>
<head>
<title>Data of Sensor</title>
</head>
<body>
<h1>Data from the temperature and moisture sensors</h1>
<form action="add.php" method="get">
<TABLE>
<tr>
<td>Temperature</td>
<td><input type="text" name="temperature" size="20" maxlength="30"></td>
</tr>
<tr>
<td>Humidity</td>
<td><input type="text" name="humidity" size="20" maxlength="30"></td>
</tr>
</TABLE>
<input type="submit" name="accion" value="Grabar">
</FORM>
<hr>
<?php
include("conec.php");
$link=Conection();
$result=mysql_query("select * from tempmoi order by id desc",$link);
?>
<table border="1" cellspacing="1" cellpadding="1">
<tr>
<td> Temperature 1 </td>
<td> Moisture 1 </td>
</tr>
<?php
while($row = mysql_fetch_array($result)) {
printf("<tr><td> %s </td><td> %s </td></tr>", $row["temp1"], $row["moi1"]);
}
mysql_free_result($result);
?>
</table>
</body>
</html>