Advertisement
Makerino

PHP Messung

Jul 28th, 2019
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?php
  2. $temperatur = $_GET["temp"] ;
  3. $feuchte = $_GET["hum"] ;
  4. $druck = $_GET["druck"] ;
  5. echo $temperatur ;
  6. echo $feuchte ;
  7. echo $druck ;
  8.  
  9. $pdo = new PDO('mysql:host=localhost;dbname=wohnzimmer', 'NUTERNAME_PHPMYADMIN', 'PASSWORT_PHPMYADMIN');
  10.  
  11. $statement = $pdo->prepare("INSERT INTO sensorwerte (Temperatur , Luftfeuchte , Druck) VALUES (?,?,?)");
  12. $statement->execute(array($temperatur , $feuchte , $druck));  
  13.  
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement