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; } } } if ($showform) { include("includes/common.php"); placeHeader("Registration"); ?>

With this form you can register for a new account. We will never give your email to someone else or send you spam! Its only purpose is to be able to send you back whether account creation succeeded.

Security warning: Do not use the same username and password on two different servers. The server admins can read all of them in clear text and nothing stops them from trying them on other servers. It happened a lot in the past that users of the official server got "hacked" because they ignored this important precaution.

"; } ?>
" . $err . "
Username:
Password:
Retype password:
EMail:
Gender:
\r\nReply-To: Accounts \r\n"; $data .= "== Account Created ==\n"; $data .= " Welcome to The Mana World! Your account should now be enabled. If you have any problems with your login contact The Mana World via the Support (live) or Forums (maybe a delay) for help. Game tips & walkthroughs are available on the Wiki. Our Forums are a great place to ask for advice and discuss possible changes. News is available in the client or on the Home Site. Godspeed Adventurer, The Mana World\n"; $message = getEmailTemplate($data); $headers .= $message[0]; mail($mail_to,$subject,$message[1],$headers); header("Location: /thank_you.php"); } ?>