$resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if( !$resp->is_valid ){ header("Location:htm/err_captcha.html"); exit; } */ ////////////////////////////////////////////////////////////////////////////// include 'Config.inc.php'; include '../lib/MYSQLDatabase.inc.php'; $db = new MYSQLDatabase($dbusername, $dbpassword, $dbhost, $dbport, $dbname); if ($db->Connect() == false) { $db->Close(); header("Location:htm/cantconnect.html"); exit; } $encrypted_password = sha1(strtoupper($username . ":" . $password)); $myquery = "INSERT INTO `accounts` (`login`,`password`,`encrypted_password`,`gm`,`flags`,`banned`,`email`) VALUES('{$username}','','{$encrypted_password}','3','24','0','{$email}')"; $myresult = $db->Query($myquery); if ($myresult == true) { $db->Close(); header("Location:htm/success.html"); exit; } else { $db->Close(); header("Location:htm/failed.html"); exit; }