Hello
First of all I apologize for my English
I am on a LoRaWan project which consists of recovering data from a sensor and displaying it on a website
In the first place I installed chirpstcak and I review the data
I integrated the http and I created a “lora” database
For the code PHP it is
<?php
header("Content-type: application/json");
$json = file_get_contents("php://input");
$obj = json_decode($json);
$decoded = base64_decode(json_encode($obj->data));
$server = "localhost";
$username = "root";
$password = "";
$DB = "lora";
$conn = new mysqli($server, $username, $password,$DB);
if ($conn->connect_error)
{
die("Connection failed: " . $conn->connect_error);
}
$insert = "INSERT INTO loratable(value) VALUES ('$decoded')";
$conn->query($insert);
$conn->close();
?>
I get no data and when I view the index.php. There is this error displayed
Can you help me because I don’t know where is the error.
Thank you