18 lines
421 B
PHP
18 lines
421 B
PHP
<?php
|
|
|
|
require_once __DIR__ . '/../../connect.php';
|
|
|
|
$notificationID = filterRequest("id");
|
|
|
|
$sql = "DELETE FROM `notificationCaptain` WHERE `id` = :id";
|
|
$stmt = $con->prepare($sql);
|
|
$stmt->bindParam(':id', $notificationID, PDO::PARAM_INT);
|
|
$stmt->execute();
|
|
|
|
if ($stmt->rowCount() > 0) {
|
|
jsonSuccess(null, "Notification data deleted successfully");
|
|
} else {
|
|
jsonError("Failed to delete notification data");
|
|
}
|
|
|
|
?>
|