$id = $_REQUEST['id']; } $orgID = $_SESSION['orgID']; if (!empty($_POST)) { // keep track post values $id = $_POST['id']; if ($_SESSION['admin'] == 2) { //Developer $sql = "DELETE FROM user WHERE ID = ?"; my_update('i', array(&$id), $sql); } else { //Admin $sql = "DELETE FROM user WHERE ID = ? AND OrgID = ?"; my_update('ii', array(&$id, &$orgID), $sql); } my_disconnect(); header("Location: index"); } else { $data = my_query('ii', array(&$id, &$orgID), "SELECT * FROM user where ID = ? AND OrgID = ?"); if ($data == null) { header("Location: index"); } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="dashboard">
function bail($epitaph) { my_disconnect(); close_session(); echo "\n<P>Sorry, your session has been closed due to an error. " . "<A HREF=\"./login.php\"><BUTTON TYPE=button> Login again </BUTTON></A>\n"; die("\n<P>\n(Fatal: " . $epitaph . ")\n</BODY></HTML>\n"); }