prepare("DELETE FROM teacher_unavailability WHERE Unavailable_ID = ?");
if ($stmt) {
$stmt->bind_param("i", $Unavailabile_ID);
if ($stmt->execute()) {
echo "Unavailability deleted successfully";
// header("Location: teacher_unavailability.php?error=Unavailability deleted successfully");
// exit();
} else {
echo "Error deleting record.";
// header("Location: teacher_unavailability.php?error=Error deleting record.");
// exit();
}
$stmt->close();
} else {
echo "Failed to prepare statement.";
//header("Location: teacher_unavailability.php?error=Failed to prepare statement.");
//exit();
}
} else {
echo "Invalid request method.";
//header("Location: teacher_unavailability.php?error=Invalid request method.");
//exit();
}
?>