} $dir = "VIEW/html/Admin/Employee_List.php?error={$error_type}"; $url = BASE_URL . $dir; header("Location:{$url}"); //redirect the admin to the Admin_Add_Users.php file exit; } if ($_SERVER['REQUEST_METHOD'] == "POST") { if (TRUE == check_login_status()) { $user_type = get_user_type(); if ($user_type == User_Type::ADMIN) { $user_admin = $_SESSION['Logged_In_User']; $admin_controller = new Admin_Controller($user_admin); if (!isset($_POST['User_ID'])) { $errors[] = "Please go back and refresh the site!"; } else { $User_ID = $_POST['User_ID']; } if (empty($errors)) { $edited = $admin_controller->Delete_User($User_ID); if ($edited) { admin_redirect_success($new_user); } else { admin_redirect_error(Error_Type::DATA_BASE); } } else { admin_redirect_error(Error_Type::FORM); } } } }