Add new files and make code improvements
This commit is contained in:
15
action/action_usuarios_delete.php
Normal file
15
action/action_usuarios_delete.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
$ruta = "../";
|
||||
require_once "../include/bd_pdo.php";
|
||||
global $db;
|
||||
|
||||
try {
|
||||
$db->querySingle("UPDATE usuario SET estado_baja = TRUE WHERE usuario_id = ?", [$_GET['id']]);
|
||||
header("Location: ../usuarios.php", true, 307);
|
||||
} catch (PDOException $e) {
|
||||
header("Location: ../usuarios.php?error=2");
|
||||
exit;
|
||||
}
|
||||
Reference in New Issue
Block a user