Mini Shell
<?php
include '../db/database.php';
$historycrownID = $_GET['id'];
$sql = "DELETE FROM history_crown WHERE historycrownID='$historycrownID'";
$result = mysqli_query($link, $sql);
if ($result) {
header('Content-Type: application/json');
echo json_encode(array('status' => 'success', 'message' => 'ลบข้อมูลเรียบร้อยแล้ว'));
} else {
header('Content-Type: application/json');
$errors = "เกิดข้อผิดพลาดในการลบ กรุณาลองใหม่ ";
echo json_encode(array('status' => 'danger', 'message' => $errors));
}
Zerion Mini Shell 1.0