setUsername($_POST['username']); $acc->setPassword($_POST['password1']); $acc->setEMail($_POST['email']); $acc->setGender($_POST['gender']); $val = $acc->validate(); if (is_array($val)) { foreach( $val as $error) { $err .= $error . "
"; } $showform = true; } if ($_POST['password2'] != $_POST['password1']) { $err .= "The given passwords don't match!"; $showform = true; } if (TMWAccount::existsUsername( $_POST['username'] )) { $err .= "The username is in use!"; $showform = true; } if ($enable_captcha) { // check captcha $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { $err .= "The captcha was incorrect!"; $showform = true; } } if (!$showform) { // create the account if (!$acc->storeAccount()) { $err = "The was an unknown error while storing your new account"; $showform = true; } } } include("includes/common.php"); placeHeader("Registration"); if ($showform) { ?>

With this form you can register for a new account. Your email is not used to send spam, its only purpose is to be able to send you back whether account creation succeeded!

"; } ?>
" . $err . "
Username:
Password:
Retype password:
EMail:
Gender:

Your account was scheduled for creation! In a few minutes you should receive an email with verification of your new account.