// session_start(); if (isset($_POST['clear']) == true) { $err_msg = ''; unset($_POST); } // keep or reset the form fields if (isset($_POST['username'])) { $username = $_POST['username']; } else { $username = ''; } if (isset($_GET['try'])) { unset($_GET['try']); if (validateUserName($err_msg)) { $conn = new dbAccess($debug); if ($conn->dbSetTempPW($username, $tempPW)) { if (sendForgotPWEmail($username, $tempPW)) { echo "Check your inbox for an email containing your temporary password<br>"; echo "and further instructions on how to complete the login process.<br>"; } else { echo "User " . $email . " was successfully registered.<br>"; echo "BUT we were unable to send your temporary password via the email address you <br>"; echo "provided. Please contact the My Vista Verde Webmaster to complete <br>"; echo "the registration process<br>"; } $display = false; } else { $err_msg = $conn->errmsg; } } }