27 lines
624 B
PHP
27 lines
624 B
PHP
<?php
|
|
|
|
require_once "../db/config.php";
|
|
require_once "../includes/functions.php";
|
|
|
|
$_REQUEST_METHOD = $_SERVER['REQUEST_METHOD'];
|
|
$response = array();
|
|
if ($_REQUEST_METHOD === 'POST') {
|
|
|
|
$id = $_POST['id'];
|
|
$api_type = $_POST['api_type'];
|
|
|
|
if (isset($connection)) {
|
|
if($api_type=='delete'){
|
|
$updateCategory = $connection->query("DELETE FROM `feedback_report` WHERE id='$id'");
|
|
}
|
|
$response["message"] = "success";
|
|
$response["status"] = 200;
|
|
}
|
|
|
|
} else {
|
|
$response["message"] = "INVALID REQUEST";
|
|
$response["status"] = 400;
|
|
}
|
|
|
|
echo json_encode($response);
|