Пример #1
0
if (isset($_POST['streetaddr'])) {
    $streetaddr = $_POST['streetaddr'];
}
if (isset($_POST['streetname'])) {
    $streetval = $_POST['streetname'];
}
// set the flag which determines if we display the registration info
$display = true;
$streetArray = array();
// call the function to populate the array of street names
$conn = new dbaccess($debug);
$conn->getStreetNames($streetArray);
if (isset($_POST['submit'])) {
    unset($_POST['submit']);
    if (validate_reg($err_msg)) {
        if ($conn->dbAddUser($firstname, $lastname, $streetnum, $streetval, $email, $tempPW)) {
            if (sendRegEmail($email, $tempPW)) {
                echo "<div class='bgWhite'><p class='userMsg'>User '{$email}' is successfully registered.<br />";
                echo "Check your inbox for an email containing your temporary password ";
                echo "and further instructions on how to complete the registration process.</p></div>";
                $display = false;
            } else {
                echo "<div class='bgWhite'><p class='userMsg'>User " . $email . " was successfully registered.<br />";
                echo "BUT we were unable to send your temporary password via the email address you ";
                echo "provided. Please contact the Vista Verde Community Webmaster to complete ";
                echo "the registration process</p><div class='bgWhite'>";
                $display = false;
            }
        } else {
            $err_msg = $conn->errmsg;
        }
Пример #2
0
if (isset($_POST['email'])) {
    $email = $_POST['email'];
}
if (isset($_POST['streetaddr'])) {
    $streetaddr = $_POST['streetaddr'];
}
// set the flag which determines if we display the registration info
$display = true;
$streetArray = array();
// call the function to populate the array of street names
$conn = new dbaccess($debug);
$conn->getStreetNames($streetArray);
if (isset($_POST['submit'])) {
    unset($_POST['submit']);
    if (validate_reg($err_msg)) {
        if ($conn->dbAddUser($tempPW)) {
            if (sendRegEmail($email, $tempPW)) {
                echo "<div class='bgWhite'><div class='userMsg'><div class='bigBold'>User Registration</div>";
                echo "User '{$email}' is successfully registered.<br />";
                echo "Check your inbox for an email containing your temporary password ";
                echo "and further instructions on how to complete the registration process.</div></div>";
            } else {
                echo "<div class='bgWhite'><div class='userMsg'><div class='bigBold'>User Registration</div>";
                echo "User '{$email}' was successfully registered <br />";
                echo "BUT we were unable to send your temporary password via the email address you ";
                echo "provided. Please contact the Vista Verde Community Webmaster to complete ";
                echo "the registration process.</div></div>";
            }
            $display = false;
        } else {
            $err_msg = $conn->errmsg;