0 ) { if( !forumUsernameInUse( $username, $mysqli ) ) { $usernameOk = true; } } if( checkEmailAddress( $email ) ) { $emailOk = true; } if( (strlen( $password ) > 0) && $password == $passwordconfirm ) { $passwordOk = true; } $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if ($resp->is_valid) { $captchaOk = true; } if( $usernameOk && $emailOk && $passwordOk && $captchaOk ) { // everything is ok, let's add them as a registered user addForumUser( $username, $email, $password, $mysqli ); // now set the username as a cookie setcookie( "dh_user_name", $username, time()+60*60*24*365, "/", ".diabeteshealth.com", 0, 1 ); header( "Location: http://" . $_SERVER['SERVER_NAME'] . $page ); exit; } else { $registrationError = true; } } if ($_POST['function'] == "sendpassword") { $phpBBUserData = getPhpBBUserData( $_POST['username'], false, $mysqli ); if (isRecursiveArrayEmpty($phpBBUserData)) { $noUser = true; } else { if ( $_POST['email'] == $phpBBUserData['userEmail'] ) { $newPassword = generatePassword(8); $activationKey = generatePassword(6); newPassword( $phpBBUserData['userId'], $newPassword, $activationKey, $mysqli ); $body = "Hello " . $phpBBUserData['userName'] . "," . "\r\n"; $body .= "\r\n"; $body .= "You are receiving this email because you have (or someone pretending to be you has) requested a new password be sent for your account at Diabetes Health. If you did not request this email, please ignore it; if you keep receiving it, please contact our webmaster by replying to this message." . "\r\n"; $body .= "\r\n"; $body .= "To use the new password, you need to activate it. To do this, click the link provided below." . "\r\n"; $body .= "\r\n"; $body .= "http://www.diabeteshealth.com/register.html?mode=activate&u=" . $phpBBUserData['userId'] . "&act_key=" . $activationKey . "\r\n"; $body .= "\r\n"; $body .= "If successful, you will be able to login using the following password:" . "\r\n"; $body .= "\r\n"; $body .= "NEW PASSWORD: " . $newPassword . "\r\n"; $body .= "\r\n"; $body .= "You can then change this password yourself via your profile page. If you have any difficulties, please contact our webmaster." . "\r\n"; $body .= "\r\n"; $body .= "Thanks," . "\r\n"; $body .= "Diabetes Health" . "\r\n"; mail( $phpBBUserData['userEmail'], "New Password Activation", $body ); $passwordSent = true; } else { $wrongEmail = true; } } } } include( $_SERVER['DOCUMENT_ROOT'] . "/includes/ads.php" ); include( $_SERVER['DOCUMENT_ROOT'] . "/includes/description.php" ); $htmlTitle = "Register - Diabetes Health"; $htmlDescription = "Diabetes Health - $sectionName. $description"; include( $_SERVER['DOCUMENT_ROOT'] . "/header.php" ); // include( $_SERVER['DOCUMENT_ROOT'] . "/includes/question.php" ); ?>

Log In or Register with Diabetes Health

Currently logged in as

Register, or log in if you have already registered, to post comments and more at DiabetesHealth.com.

Log In...

Username: Password:

Sign Up...

Please choose a different username, the one you have entered is already in use.

Register your Diabetes Health Username here.

style="color: red"> Your Chosen Username: style="color: red"> Your Email Address:
style="color: red"> Chosen Password: style="color: red"> Confirm Password:
style="color: red"> Type These Two Words:

Forgot My Password

If you have forgotten your password, please enter your username and the email address you used to register. We will then email you a replacement.

Username: Email: