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