Username:dom123
geschrieben am 07.03.2005 um 00:29 Uhr
|
also kann mir einer schreiben wo ich hier denn cookie reinsetzen muss
<?
session_start();
include("login.php");
$login = false;
$rechte = "user";
if (!empty($_SESSION['bs_pw']) && empty($_GET['nick'])){
if ($_SESSION['bs_pw'] == @mysql_result(mysql_query("SELECT `passwort` FROM member WHERE `nick` = '$_SESSION[bs_nickname]'"), 0)){
$login = true;
}
} else {
$nickname = $_GET['nick'];
$passwort = $_GET['pw'];
if (md5($passwort) == @mysql_result(mysql_query("SELECT `passwort` FROM member WHERE `nick` = '$nickname'"), 0)){
$login = true;
$rechte = @mysql_result(mysql_query ("select typ from member where nick = '$nickname'"),0);
}
$_SESSION['bs_nickname'] = $nickname;
$_SESSION['bs_pw'] = md5($passwort);
}
if ($login) {
$rechte = @mysql_result(mysql_query ("select typ from member where nick = '$_SESSION[bs_nickname]'"),0);
}
echo "&nick=$_SESSION[bs_nickname]&rechte=$rechte&";
?> |