<?php
include "koneksi.php";
$response = array();
if(isset($_POST['id_keluhan'])){
	$id_keluhan = $_POST['id_keluhan'];

	$sql = "DELETE FROM keluhan WHERE id_keluhan='".$id_keluhan."'";
	$result = mysqli_query($koneksi, $sql);
	if($result){
		$response["success"] = 1;
		$response["message"] = "Keluhan Berhasil Dihapus";
		echo json_encode($response);
	} else {
		$response["success"] = 0;
		$response["message"] = "Keluhan Gagal Dihapus";
		echo json_encode($response);
	}
} else {
	$response["success"] = 0;
	$response["message"] = "Keluhan Gagal Dihapus";
	echo json_encode($response);
}
?>
