No data posted with HTTP POST. /* ==================================================== $x = $_GET[count]; echo 'Op te slaan: ' . $x . '
'; // Create connection $conn = new mysqli ('localhost', 'bertus', 'abmh', 'magneet'); // Check connection if ($conn->connect_error) { die ('Connection failed: ' . $conn->connect_error . '
'); } // Add new data $res = $conn->query ("insert into veld (count) values (" . $x . ");")) { printf("Insert returned %d rows.\n", $res->num_rows); // free res set $res->close(); } $sql = "SELECT * FROM veld;"; // toon meetresultaten if ($result = $conn->query($sql)) { // toon heading echo ''; while ($row = $result->fetch_assoc()) { $row_datum = $row["datum"]; $row_count = $row["count"]; // Uncomment to set timezone to - 1 hour (you can change 1 to any number) //$row_reading_time = date("Y-m-d H:i:s", strtotime("$row_reading_time - 1 hours")); // Uncomment to set timezone to + 4 hours (you can change 4 to any number) //$row_reading_time = date("Y-m-d H:i:s", strtotime("$row_reading_time + 4 hours")); echo '
'; } $result->free(); $conn->close(); ?> */
Datum
Count
' . $row_datum . '
' . $row_count . '