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

$unique_user_id = addslashes(isset($_POST['unique_user_id']) ? $_POST['unique_user_id'] : '');

$sql = ("DELETE FROM users WHERE unique_user_id = '$unique_user_id'");
if (mysqli_query($conn, $sql)) {
    $statusCode = 200;
    $statusMessage = "User Deleted Successfully";
} else {
    $statusCode = 1042;
    $statusMessage = mysqli_error($conn);
}



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