$pHandler->reset(); header("Location: ../index.php"); } elseif ($action == "Login") { $password = trim($_POST["password"]); if ($pHandler->authenticate($password)) { if (!$refUrl || strtolower(substr($refUrl, 0, 4)) == 'http' || strpos($refUrl, 'newprofile.php')) { header("Location: ../index.php"); } else { header("Location: " . $refUrl); } } else { $statusStr = 'Your username or password was incorrect. Please try again.<br/> If you are unable to remember your login credentials,<br/> use the controls below to retrieve your login or reset your password.'; } } elseif ($action == "Retrieve Login") { if ($emailAddr) { if ($pHandler->lookupUserName($emailAddr)) { $statusStr = "Your login name will be emailed to you."; } else { $statusStr = $pHandler->getErrorStr(); } } } elseif ($resetPwd) { $statusStr = $pHandler->resetPassword($login); } else { $statusStr = $pHandler->getErrorStr(); } ?> <html> <head> <title><?php