Hallo RT, ich möchte in dem Register die Mottofunktion einfügen.
phpcode:
Spoiler anzeigen
<?php
error_reporting(0);
require_once("data_classes/server-data.php_data_classes-core.php.php");
if(isset($_SESSION["username"]))
header("location: me");
if(isset($_POST['submit']))
{
$username = mysql_real_escape_string($_POST['username']);
$password = $_POST['password'];
$password2 = $_POST['password2'];
$email = mysql_real_escape_string($_POST['email']);
$last_online = strtotime(date("H:i"));
$last_ip = $_SERVER['REMOTE_ADDR'];
$ip_reg = $_SERVER['REMOTE_ADDR'];
$online = 1;
$agb_check = $_POST['agb_check'];
$geschlecht = $_POST['geschlecht'];
if (strlen($username) > 0 OR strlen($password) > 0 OR strlen($password2) > 0 OR strlen($email) > 0)
{
$checkusername = mysql_query("SELECT id FROM users WHERE username = '".$username."' LIMIT 1");
if(mysql_num_rows($checkusername) == 0) {
if(strlen($username) > 2)
{
if(strlen($password) > 5)
{
if($password == $password2)
{
if(strlen($email) > 0)
{
if ($agb_check!=0) {
if ($geschlecht == "m" $geschlecht == "f") {
mysql_query("INSERT INTO users (username, password, mail, last_online, ip_last, ip_reg, online, gender) VALUES (
'".$username."',
'".sha1(sha1($password2))."',
'".$email."',
'".$motto."',
'".$last_online."',
'".$last_ip."',
'".$ip_reg."',
'".$online."',
'".$geschlecht."'
)") or die(mysql_error());
$_SESSION['username'] = $username;
$_SESSION['password'] = sha1(sha1($password));
header("location: me");
}else{
$err = "Yanlis!";
}
}else{
$err = "AGB'leri kabul et!";
}
} else {
$err = "E-Posta yanlis!";
}
} else {
$err = "Sifren yanlis!";
}
} else {
$err = "Sifren cok kisa!";
}
} else {
$err = "Üye Adin cok kisa!";
}
} else {
$err = "Kullanici Adi baska biri kullaniyor!";
}
} else {
$err = "Oops, bir hata olustu!";
}
}
?>
Wäre nett wenn ihr mir helfen würdet, ich benutze eine ReCMS.