AlkantarClanX12
| Current Path : /home/xdlcxzbz/accountsmtsgroup.com/ |
| Current File : //home/xdlcxzbz/accountsmtsgroup.com/delete-user.php |
<?php
session_start();
if (!isset($_SESSION['userID'])) {
header("Location: sign-in.php");
exit();
}
require_once "SqlConnection/MySqlConnection.php";
$id = $_POST['id'];
$sql = "Delete from login where id='".$id."';";
$sql .= "Delete from rights where id='".$id."'";
$result = mysqli_multi_query($conn,$sql);
if($result){
header("Location: users.php");
}
else{
echo "Error while deleting user";
}
?>