displayAccountForm("success", $us_state_abbrevs, $relationships); $accountInfoStatus = TRUE; } else { displayAccountForm("tech_diff", $us_state_abbrevs, $relationships); } if ($accountInfoStatus) { if (automatedPasswordReset()) { displayPasswordForm("success_automated"); } else { displayPasswordForm("tech_diff_automated"); } } else { displayPasswordForm("verify_account_info"); } } else { displayAccountForm("fail", $us_state_abbrevs, $relationships); } } } // Create dropdown of states with user's state pre-selected function createStateAbbrevOptions($us_state_abbrevs, $memberState) { $stateAbbrevOptions; foreach ($us_state_abbrevs as &$stateAbbrev) { if ($stateAbbrev == $memberState) { $stateAbbrevOptions .= '<option value="' . $stateAbbrev . '" selected>' . $stateAbbrev . '</option>'; } else { $stateAbbrevOptions .= '<option value="' . $stateAbbrev . '">' . $stateAbbrev . '</option>'; } } return $stateAbbrevOptions;
displayAccountForm("success"); $accountInfoStatus = TRUE; } else { displayAccountForm("tech_diff"); } if ($accountInfoStatus) { if (automatedPasswordReset()) { displayPasswordForm("success_automated"); } else { displayPasswordForm("tech_diff_automated"); } } else { displayPasswordForm("verify_account_info"); } } else { displayAccountForm("fail"); } } } function automatedPasswordReset() { include '../../mail/password_reset.php'; $password_string = '!@#$%*&abcdefghijklmnpqrstuwxyzABCDEFGHJKLMNPQRSTUWXYZ23456789'; $password = substr(str_shuffle($password_string), 0, 12); if (submitPassword($password)) { sendMail(trim($_POST["email"]), $password); return TRUE; } else { return FALSE; } }