37497-vm/delete_department.php
Flatlogic Bot 65bff23a0b 1
2026-01-16 09:31:10 +00:00

12 lines
270 B
PHP

<?php
require_once 'db/config.php';
$id = $_GET['id'];
try {
$stmt = db()->prepare("DELETE FROM departments WHERE id = ?");
$stmt->execute([$id]);
header('Location: user_management.php');
} catch (PDOException $e) {
echo "Error: " . $e->getMessage();
}