Skip to content

Commit

Permalink
use json body
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasnteireho committed Sep 18, 2024
1 parent d7d31de commit 708cdd5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions bad-answer-alert.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
header('Access-Control-Allow-Methods: GET, POST');
header("Access-Control-Allow-Headers: X-Requested-With");


$entityBody = file_get_contents('php://input');
$body_data = json_decode(file_get_contents('php://input'), true);

$path = dirname(__FILE__, 2);
$config = parse_ini_file($path . '/config_env.ini');
$service_email = $config['SERVICE_EMAIL'];
Expand All @@ -28,10 +32,10 @@ function checkRequest($keys, $user_agent){
die();
}

$interviewtitle= ($_REQUEST["guideTitle"]);
$viewerversion= ($_REQUEST["guideTitle"]);
$variables = ($_REQUEST["invalidAnswers"]);
$authorid = ($_REQUEST["authorid"]);
$interviewtitle= ($body_data["guideTitle"]);
$viewerversion= ($body_data["guideTitle"]);
$variables = ($body_data["invalidAnswers"]);
$authorid = ($body_data["authorid"]);
$created=$now=date("Y-m-d-H-i-s");


Expand Down

0 comments on commit 708cdd5

Please sign in to comment.