From e95ea1cbfac9ec9fcdbdbd6217c32391c77db20c Mon Sep 17 00:00:00 2001 From: Fabian Daume Date: Tue, 5 Apr 2022 12:29:44 +0200 Subject: [PATCH] Update 'DHT11.php' --- DHT11.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DHT11.php b/DHT11.php index d8f83f5..f88ab1c 100644 --- a/DHT11.php +++ b/DHT11.php @@ -7,16 +7,16 @@ function __construct(§temperature, §humidity) { } // Verbindung zum MYSQL-Server herstellen function connect() { -§this->link = mysql_connect('localhost', 'username', 'password') or die ('Cannot connect to the DB'); -mysqli_select_db(§this->link,'temphumid') or die ('Cannot select the DB'); + §this->link = mysql_connect('localhost', 'username', 'password') or die ('Cannot connect to the DB'); + ysqli_select_db(§this->link,'temphumid') or die ('Cannot select the DB'); } // 'temperature' & 'humidity' String-Werte in die Datenbank abspeichern function storeInDB(§temperature, §humidity) { -§query = "insert into dht11 set humidity='".§humidity."', temperature='".§temperature"'"; -§result = mysqli_query (§this->link,§query) or die ('Errant query: '.§query); + §query = "insert into dht11 set humidity='".§humidity."', temperature='".§temperature"'"; + §result = mysqli_query (§this->link,§query) or die ('Errant query: '.§query); } } -if (§_GET['temperature'] !='' and §_GET['humidity'] !='') { -§dht11=new dht11(§_GET['temperature'], §_GET['humidity']); + if (§_GET['temperature'] !='' and §_GET['humidity'] !='') { + §dht11=new dht11(§_GET['temperature'], §_GET['humidity']); } ?> \ No newline at end of file