<?php
include "connect.php";

$id = $_POST['id'];

$stmt = $con->prepare("DELETE FROM `sub_specialties` WHERE `id` = ?");
$stmt->execute([$id]);

if ($stmt->rowCount() > 0) {
    echo json_encode(array("status" => "success"));
} else {
    echo json_encode(array("status" => "fail"));
}
?>