enorme push
This commit is contained in:
14
tpCrudTwig/public/users/delete.php
Normal file
14
tpCrudTwig/public/users/delete.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
|
||||
$SERVER_ROOT = $_SERVER['DOCUMENT_ROOT'] . "/tpCrudTwig";
|
||||
|
||||
require_once($SERVER_ROOT . "/src/User.php");
|
||||
|
||||
if (isset($_GET['id']) && !empty($_GET['id'])) {
|
||||
$id = strip_tags($_GET['id']);
|
||||
DeleteUser($id);
|
||||
$_SESSION['message'] = "Utilisateur supprimé avec succès !";
|
||||
header('Location: ../index.php');
|
||||
}
|
||||
Reference in New Issue
Block a user