-
Notifications
You must be signed in to change notification settings - Fork 0
/
add.php
35 lines (26 loc) · 987 Bytes
/
add.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
<?php
include("connect.php");
$link=Connection();
$tempciel=$_POST["temperatureciel"];
$tempambient=$_POST["tempambient"];
$pluie=$_POST["detectionpluie"];
$tempsol=$_POST["tempsol"];
$skysqm=$_POST["sqmaverage"];
$query = "INSERT INTO Temperatures (NomSonde, Valeur)
VALUES ('TemperatureCiel','$tempciel')";
$query1 = "INSERT INTO Humidite (NomSonde, Valeur)
VALUES ('detecpluie','$pluie')";
$query2 = "INSERT INTO Temperatures (NomSonde, Valeur)
VALUES ('TemperatureAmbient','$tempambient')";
$query3 = "INSERT INTO Temperatures (NomSonde, Valeur)
VALUES ('TemperatureSol','$tempsol')";
$query4 = "INSERT INTO SQMsky (NomSonde, Valeur)
VALUES ('SkyQuality','$skysqm')";
file_put_contents(log.txt, $tempciel);
mysql_query($query,$link);
mysql_query($query1,$link);
mysql_query($query2,$link);
mysql_query($query3,$link);
mysql_query($query4,$link);
mysql_close($link);
?>