Wenn ich auf denn registrieren Button klicke passiert das hier.
So siht das Regestrieren aus.
Hat jemand eine Lösung ?
EDIT!
PHP Code:
<div class="con_top">Registration</div>
<div class="con_mid">
<?PHP
session_start();
if ($_POST['submit']){
if($_POST["account"] == "" || $_POST["pass"] == "" || $_POST["loeschcode"] == ""){
header ("Location: register.php?error=notfilled");
return false;
}
else if (strlen($_POST["pass"]) <8 || strlen($_POST["pass"]) >16 || !ctype_alnum($_POST["pass"])){
header ("Location: index.php?s=register&error=pass");
return false;
}
else if (strlen($_POST["account"]) <8 || strlen($_POST["account"]) >16 || !ctype_alnum($_POST["account"])){
header ("Location: index.php?s=register&error=acc");
return false;
}
else if (strlen($_POST["loeschcode"]) != 7 || !ctype_alnum($_POST["loeschcode"])){
header ("Location: index.php?s=register&error=loeschcode");
return false;
}
if($_POST["captcha"]!=$_SESSION["captcha_id"]){
header("Location: index.php?s=register&error=captcha");
return false;
}
$checksql = "SELECT login FROM account.account WHERE login = ".mysql_real_escape_string($_POST["account"]);
$result = $sqlServ->query($checksql);
if($result->num_rows != 0){
header("Location: index.php?s=register&error=nametaken");
return false;
}
$sql = "INSERT INTO account.account (login, password, zipcode, status) VALUES ('".mysql_real_escape_string($_POST["account"])."', ".mysql_real_escape_string(md5($_POST["pass"]))."', ".mysql_real_escape_string($_POST["loeschcode"])."', ".mysql_real_escape_string("OK");
if ($sqlServ->query($sql) === TRUE) {
header("Location: index.php?s=register&success=true");
return true;
}
else
{
header("Location: index.php?s=register&error=sql");
return false;
}
}
?>
<form action="index.php?s=register" method="POST">
<table>
<tr>
<th class="topLine">Account:</th>
<td class="tdunkel"><input type="text" name="account" maxlength="16" size="16"/> 8-16 Zeichen (nur a-Z,0-9)</td>
</tr>
<tr>
<th class="topLine">Password:</th>
<td class="tdunkel"><input type="password" name="pass" maxlength="16" size="16"/> 8-16 Zeichen (nur a-Z,0-9)</td>
</tr>
<tr>
<th class="topLine">Löschcode:</th>
<td class="tdunkel"><input type="text" name="loeschcode" maxlength="7" size="7"/> 7 Zeichen (nur a-Z,0-9)</td>
</tr>
<tr>
<th class="topLine">Captcha:</th>
<td class="tdunkel"><img src="./captcha/captcha.php" title="Captcha"/> <input type="text" name="captcha" maxlength="5" size="5"/></td>
</tr>
<tr>
<th class="topLine" style="text-align:center;" colspan="2"><input type="submit" name="submit" value="registrieren"/> • <input type="reset" value="zurücksetzen"/></th>
</tr>
</table>
</form>
</div>
<div class="con_bot"></div>
<?PHP
if(isset($_REQUEST["error"])){
$e = $_REQUEST["error"];
if($e == "pass"){
echo "Das Passwort entspricht nicht den Anforderungen";
} else if($e == "notfilled"){
echo "Es wurden nicht alle Felder ausgefüllt";
} else if($e == "acc"){
echo "Accountname entspricht nicht den Anforderungen";
} else if($e == "loeschcode"){
echo "Loeschcode entspricht nicht den Anforderungen";
} else if($e == "captcha"){
echo "Captcha falsch";
} else if($e == "nametaken"){
echo "Name bereits genutzt";
} else if($e == "sql"){
echo "SQL Fehler";
}
}
?>
PHP Code:
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `account`
-- ----------------------------
DROP TABLE IF EXISTS `account`;
CREATE TABLE `account` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`login` varchar(30) NOT NULL DEFAULT '',
`password` varchar(45) NOT NULL DEFAULT '',
`real_name` varchar(16) DEFAULT '',
`social_id` varchar(13) NOT NULL DEFAULT '',
`email` varchar(64) NOT NULL DEFAULT '',
`phone1` varchar(16) DEFAULT NULL,
`phone2` varchar(16) DEFAULT NULL,
`address` varchar(128) DEFAULT NULL,
`zipcode` varchar(7) DEFAULT '',
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`question1` varchar(48) DEFAULT NULL,
`answer1` varchar(48) DEFAULT NULL,
`question2` varchar(48) DEFAULT NULL,
`answer2` varchar(48) DEFAULT NULL,
`is_testor` tinyint(1) NOT NULL DEFAULT '0',
`status` varchar(8) NOT NULL DEFAULT 'OK',
`securitycode` varchar(192) DEFAULT '',
`newsletter` tinyint(1) DEFAULT '0',
`empire` tinyint(4) NOT NULL DEFAULT '0',
`name_checked` tinyint(1) NOT NULL DEFAULT '0',
`availDt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`mileage` int(11) NOT NULL DEFAULT '0',
`cash` int(11) NOT NULL DEFAULT '0',
`gold_expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`silver_expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`safebox_expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`autoloot_expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`fish_mind_expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`marriage_fast_expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`money_drop_rate_expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ttl_cash` int(11) NOT NULL DEFAULT '0',
`ttl_mileage` int(11) NOT NULL DEFAULT '0',
`channel_company` varchar(30) NOT NULL DEFAULT '',
`last_play` datetime NOT NULL,
`coins` int(11) NOT NULL DEFAULT '0',
`web_admin` int(1) NOT NULL DEFAULT '0',
`web_ip` varchar(15) NOT NULL,
`web_aktiviert` varchar(32) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `login` (`login`),
KEY `social_id` (`social_id`)
) ENGINE=MyISAM AUTO_INCREMENT=52183 DEFAULT CHARSET=ascii;
-- ----------------------------
-- Records of account
-- ----------------------------
INSERT INTO `account` VALUES ('1', 'sanii187', '*830EAC57F255B7F37B5B6DF6E259E9AAB6CDA337', '', '0000000', '', null, null, null, '', '0000-00-00 00:00:00', null, null, null, null, '0', 'OK', '', '0', '0', '0', '0000-00-00 00:00:00', '0', '0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0', '0', '', '2012-10-13 14:16:22', '0', '0', '', '');