<?php
header('content-type:application/json');
include($_SERVER['DOCUMENT_ROOT'] . "/API/connection/conn.php");

$config_id = addslashes(isset($_GET['config_id']) ? $_GET['config_id'] : '');

    $sql = ("DELETE FROM config WHERE id = '$config_id' ");
    if (mysqli_query($conn, $sql)) {
        $statusCode = 200;
        $statusMessage = "Saved Successfully";
    } else {
        $statusCode = 1042;
        $statusMessage = mysqli_error($conn);
    }


$resultData = array('code' => $statusCode, 'message' => $statusMessage);

echo json_encode($resultData);
