forked from Lake-Tuggeranong-College/CyberCity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dataUpload.php
33 lines (23 loc) · 954 Bytes
/
dataUpload.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
<?php
//include "template.php";
include "config.php";
include "dataCommon.php";
/** @var $conn */
/*
Rui Santos
Complete project details at https://RandomNerdTutorials.com/esp32-esp8266-mysql-database-php/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
*/
// Keep this API Key value to be compatible with the ESP32 code provided in the project page.
// If you change this value, the ESP32 sketch needs to match
$api_key = $sensor = $location = $sensorValue = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
uploadData();
} else {
echo "This page is only accessible via POSTing from ESP32s";
// header("Location:index.php");
// $_SESSION['flash_message'] = "<div class='bg-danger'>No post data sent</div>";
}