also bei mir is das ein klein wenig anders....versuchs mal damit:
PHP-Code:
//Nickname ändern beginn !
if ($_POST['aendern'] == 'Jetzt ändern!')
{
if (isset ($_POST['nickname'])) {
$nickname = mysql_real_escape_string(htmlentities($_POST['nickname']));
$nickname = strip_tags($nickname);
$nickname_check =db_query ("SELECT `nickname` FROM ".$db_prefix."_userdaten WHERE nickname='".$nickname."'");
$nickname_check2 =db_query ("SELECT `nickname` FROM ".$db_prefix."_userdaten WHERE nickname='".$nickname."'AND uid=".$_SESSION['uid']."");
if (mysql_num_rows($nickname_check))
if (mysql_num_rows($nickname_check2)) {
}else{
$change = 'Dieser Nickname ist schon vergeben!<br>';
}
else
{
db_query("UPDATE ".$db_prefix."_userdaten SET nickname = '".$nickname."' WHERE uid=".$_SESSION['uid']."");
}
}
}