<?php
session_start();
require 'db_connection.php';

if(!isset($_SESSION['user_id'])){
    exit();
}

$id = intval($_POST['id']);

/* UPDATE STATUS */
$stmt = $conn->prepare("
UPDATE notification_recipients
SET status='read'
WHERE notification_id=? AND role='parent'
");

$stmt->bind_param("i", $id);
$stmt->execute();

echo "success";
?>