Location: PHPKode > scripts > PHP Address book > php-address-book_v_1.01_eng/php-address-book_v_1.01_eng/user_delete.php
<?php 
include_once 'includes/header.inc.php'; 

if(!$session->getRole() == 2){
    header("location: login.php");
}

$id = $database->escape($_GET['id']);

if($_GET['action'] == "confirmed"){
    $database->query("DELETE FROM `cal_users` WHERE `id` = '$id'");
    header("location: user_management.php");
}

?>
<legend>Are you sure you want to remove this user?</legend>
<a href="<?php echo $url; ?>user_edit.php?id=<?php echo $id; ?>" class="btn btn-danger">No</a>
<a href="<?php echo $url; ?>user_delete.php?id=<?php echo $id; ?>&action=confirmed" class="btn btn-success">Yes</a>

<?php include_once 'includes/footer.inc.php'; ?>
Return current item: PHP Address book