//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"; } } if ($_POST['action'] == "changepassword") { if ($log->changepassword($_POST['oldpassword'], $_POST['newpassword1'], $_POST['newpassword2']) == true) { //do something on successful password reset echo "Successfully Change Password!"; } else { //do something on failed password reset echo "Failed to Change Password!"; }