<?php
require_once 'db_connect.php';
if (isset($_POST['id'])) {
    $id = intval($_POST['id']);
    // حذف من الجدولين
    $conn->query("DELETE FROM parent_student_link WHERE parent_id = $id");
    $conn->query("DELETE FROM parents WHERE id = $id");
    echo json_encode(['status' => 'success']);
}
?>