// Pharmacist header("Location:interface/pharmacist/main.php"); break; default: // Unknown User $log->logout(); header("location:interface/login/login.php"); } } else { //do something on FAILED login echo "Failed Login"; header("location:interface/login/login.php"); } } if ($_POST['action'] == "resetlogin") { if ($log->passwordreset($_POST['username']) == true) { //do something on successful password reset echo "Successful Password Reset"; } else { //do something on failed password reset echo "Failed Password Reset"; } } if ($_POST['action'] == "register") { if ($log->newuser($_POST['username'], $_POST['password1'], $_POST['password2'], $_POST['level'], $_POST['facility'], $_POST['lname']) == true) { //do something on successful password reset echo "Created New User!"; } else { //do something on failed password reset echo "Failed to Create User"; }