<?php

require_once '../include/DatabaseConn.php';

$db = new DatabaseConn();
$link = $db->connect();

$std = new stdClass();

$id = filter_input(INPUT_GET, "id",FILTER_VALIDATE_INT);

if(is_null($id)) {
    $std->error = "Invalid token";
    header("content-type: application/json");
    echo (json_encode($std));
    die();
}

 mysqli_query($link, "DELETE FROM `notifications` WHERE `id` = $id"); 
 $std->msg = "ok";
header("content-type: application/json");
echo (json_encode($std));
die();
