> is dit nodig ???? >> $now = new DateTime(); parse_str( html_entity_decode( $_SERVER["QUERY_STRING"]) , $out); if ( array_key_exists( "toer" , $out ) ) { // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $toeren = $out["toer"]; $ActGeb = $out["KwH"]; $stand = $out["stand"]; $sql = "INSERT INTO ElectMeterMeter (toer, KwH, stand) VALUES ($toeren, $ActGeb, $stand)"; if ($conn->query($sql) === TRUE) { echo "ok"; } else { echo "Error: " . $sql . "
" . $conn->error; } $conn->close(); } ?>