//All fields set, fields have a value $abstractDAO = new AbstractDAO(); if (!$abstractDAO->hasDbError()) { $username = $_POST['username']; $password = $_POST['password']; $abstractDAO->authenticate($username, $password); if ($abstractDAO->isAuthenticated()) { $_SESSION['abstractDAO'] = $abstractDAO; $_SESSION['abstractDAO']->setAdminID(1); $_SESSION['abstractDAO']->setAdminLevel('Administrator'); /*Here I will add the username and password and other info to the adminuser DB and later retrieve it in internal*/ $userDAO = new userDAO(); /* $username = $_POST['username']; $password = $_POST['password']; $adminLevel = 'Administrator';*/ $userDAO->insertUser(null, $_POST['username'], $_POST['password'], 'Administrator', null); header('Location:internal.php'); } } } } } ?> <?php include './header.php'; ?> <!-- MESSAGES --> <div id="content" class="clearfix">