$birthdayDay = '0' . $birthdayDay; } } //merge the birthday $birthday = $birthdayMonth . '/' . $birthdayDay . '/' . $birthdayYear; ###################################### ######### Country Check ############## if ($countryError = AccountsRegister::checkCountry($country)) { $ERRORS->Add($countryError); } ###################################### ## Secret Question & Answer Check #### if ($secretQuestionError = AccountsRegister::checkSecretQuestion($secretQuestion)) { $ERRORS->Add($secretQuestionError); } if ($secretAnswerError = AccountsRegister::checkSecretAnswer($secretAnswer)) { $ERRORS->Add($secretAnswerError); } $secretAnswer = trim($secretAnswer); ###################################### ######### Text Captcha Check ######### /* if ($CaptchaResponseField = $captcha->GetResponseFieldName()) { $CaptchaResponse = isset($_POST[$CaptchaResponseField]) ? $_POST[$CaptchaResponseField] : false; //check if it was filled in if (!$CaptchaResponse) { $ERRORS->Add('Please answer the Human Test question.'); } else if (!$captcha->CheckAnswer($CaptchaResponse))
$displayName = isset($_POST['displayName']) ? $_POST['displayName'] : false; $currency = isset($_POST['currency']) ? (int) $_POST['currency'] : false; //Define the cost of display name change $PurchaseCost_Silver = 100; $PurchaseCost_Gold = 10; //Setup the finances class $finance = new AccountFinances(); //prepare the log $logs = new purchaseLog(); ###################################### ############### CHECKs ############### if (!$displayName) { //no new password $ERRORS->Add('Please enter your new Display Name.'); } else { if ($displaynameError = AccountsRegister::checkDisplayname($displayName)) { $ERRORS->Add($displaynameError); } } if (!$currency) { //no currency is selected $ERRORS->Add('Please select a currency for the purchase.'); } else { if (!$finance->IsValidCurrency($currency)) { //invalid currency $ERRORS->Add('Error, invalid currency selected.'); } } //Check for errors $ERRORS->Check('/index.php?page=changedname'); ######################################