initial commit
This commit is contained in:
24
login/rem_user.php
Normal file
24
login/rem_user.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if(session_status() !== PHP_SESSION_ACTIVE){
|
||||
session_start();
|
||||
}
|
||||
include_once("../conexao.php");
|
||||
adm_auth();
|
||||
|
||||
$id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT);
|
||||
$stmt = $con->prepare('DELETE FROM login_usuarios WHERE id = ?');
|
||||
$stmt->bind_param('s',$id);
|
||||
if($stmt->execute())
|
||||
{
|
||||
if($stmt->affected_rows > 0){
|
||||
$_SESSION['msg'] = "Usuário excluido com sucesso!";
|
||||
header("Location: list_login.php");
|
||||
}
|
||||
else{
|
||||
$_SESSION['msg'] = "Falha na exclusão.";
|
||||
header("Location: list_login.php");
|
||||
}
|
||||
|
||||
}
|
||||
$stmt->close();
|
||||
?>
|
Reference in New Issue
Block a user