So I have this in php and it keeps giving me an error:
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include("JSON_Test.php");
// Takes raw data from the request
$json = file_get_contents('php://input');
// Converts it into a PHP object
$data = json_decode($json);
$integer = $data->name;
$query = "INSERT INTO Insect_Score_Board ( name , score) VALUES($integer, $data->score)";
$conn->exec($query);
echo $data->name.", ".$data->score."mommy";
?>
but if I change
$query = "INSERT INTO Insect_Score_Board ( name , score) VALUES('random ', $data->score)";
only $data->name seems to be giving me the problem