<?php
session_start();
if(!isset($_SESSION['username'])) {
    header("Location: ../login.php");
    exit();
}

include('../includes/db.php');

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

if($id > 0) {
    mysqli_query($conn, "DELETE FROM manual_entries WHERE id = $id");
}

header("Location: manual_entries_list.php");
exit();
?>