<?php

session_start();
include 'config.php';

if($_SESSION['role']!='admin'){
    exit;
}

$id = (int)$_GET['id'];
$user = (int)$_GET['user'];

mysqli_query(
    $conn,
    "DELETE FROM absensi WHERE id='$id'"
);

header(
    "Location: absensi_manual.php?id=".$user
);