Could Not Add Admin <span class="ti-face-sad" ></span>
                    </div>';
            } else {
                $id = $obj->get_insert_id();
                $user->add_users($username, $password, $admin, $id);
                echo '<div id="divStatus" class="success">
			New Admin Added <span class="ti-face-smile" ></span>
                    </div> ';
            }
        }
        break;
    case 3:
        include_once 'administrator.php';
        $obj1 = new administrator();
        $obj1->get_administrators();
        $row = $obj1->fetch();
        $nid = $row['admin_id'];
        if ($nid != 0) {
            echo '<table id="tableExample" class="reportTable">';
            echo "<tr class='header'><th>First Name</th><th>Surname </th>\n                        <th>Gender </th><th>Department </th><th> </th></tr>";
            $i = 0;
            while ($row) {
                $fn = $row['admin_fname'];
                $sn = $row['admin_sname'];
                $gender = $row['gender'];
                $dpt = $row['department_name'];
                if ($i % 2 == 0) {
                    echo '<tr class="row1"><td>' . $fn . '</td>
                                    <td>' . $sn . '</td>
                                    <td>' . $gender . '</td>
                                    <td>' . $dpt . '</td>
                    $user_nurse = new nurses();
                    $user_nurse->get_nurse($id);
                    $user_row = $user_nurse->fetch();
                    $_SESSION['user'] = $user;
                    $_SESSION['fname'] = $user_row['nurse_fname'];
                    $_SESSION['sname'] = $user_row['nurse_sname'];
                    $_SESSION['id'] = $id;
                    $_SESSION['admin'] = false;
                    header('Location: index.php');
                } else {
                    session_start();
                    $id = $row['id'];
                    include_once 'administrator.php';
                    $user_admin = new administrator();
                    $user_admin->get_administrator($id);
                    $user_row = $user_admin->fetch();
                    session_start();
                    $_SESSION['user'] = $user;
                    $_SESSION['fname'] = $user_row['admin_fname'];
                    $_SESSION['sname'] = $user_row['admin_sname'];
                    $_SESSION['id'] = $id;
                    $_SESSION['admin'] = true;
                    header('Location: index.php');
                }
            }
        }
    }
}
?>
        
    </body>
    +"&gender="+g+"&dpt="+d+"&nid="+nid,true);
    xmlhttp.send();

}

</script>

        <?php 
$nid = intval($_REQUEST['id']);
include_once "administrator.php";
include_once 'department.php';
$obj = new administrator();
if (!$obj->get_administrator($nid)) {
    echo 'could not find';
}
$row = $obj->fetch();
$sname = $row['admin_sname'];
$fname = $row['admin_fname'];
$gender = $row['gender'];
$department = intval($row['department']);
$deptment = new departments();
?>
        <form action="nursesupdate.php" method="post" id="add-form">
           
                
                <legend> Update Nurse Information </legend>
                <table class="add">
                    <tr id="add-icon">
                        <td colspan="2">
                        <span class="flaticon-nurse7"></span>
                        </td>