File "a_users_delete.php"

Full Path: /home/ccipcixf/public_html/hirepro/admin/a_users_delete.php
File size: 587 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

if (session_status() == PHP_SESSION_NONE) {
    session_start();
}
// Check if the user is not an Admin, redirect them to index.php
if (!isset( $_SESSION["admin_role"]) ||  $_SESSION["admin_role"] !== "Admin") {
    echo '<script type="text/javascript">window.location.href = "index.php";</script>';
    exit(); // Add an exit to stop further execution after redirection
}

$user_id = $_GET["id"];

require "config.php";


$query = "DELETE FROM `a_questionnaire` WHERE `id`= '{$user_id}'";

mysqli_query($conn, $query);

header("Location:a_users.php");


?>