<?php
include "../../config/master.php";

allowRoles([1,5,6]);

$id = intval($_GET['id'] ?? 0);

/* DELETE FAMILY + MEMBERS */

mysqli_query($conn,"DELETE FROM family_members WHERE family_id='$id'");
mysqli_query($conn,"DELETE FROM families WHERE id='$id'");

echo "<script>
alert('Family Deleted Successfully');
window.location='view_families.php';
</script>";
?>