<?php
session_start();
include '../include/config.php';
$doctor_id = $_SESSION['doctor_id'];
$result = $conn->query("SELECT * FROM staff_doctor_chat WHERE doctor_id = $doctor_id AND is_read = 0");
echo json_encode(["unread" => $result->num_rows]);
?>