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.
Note that you also need to download Manaplus, The Mana World's official client, and run it to log in and play.
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. Also your email is important to send you a new password if you forgot yours (further information).
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.
\r\nReply-To: Accounts