Image

Imagerhouben wrote in Imagephp

hi folks!

i am kinda new to here aswell, hopefully you guys / girls out there can help me out from time to time :)

and here's my first problem, i am trying to unregister a session, but the session isn't destroyed allthough it should be.. can somebody give me a hand here?...


include('common.inc');
session_start();
$user_auth = new common();
$user_auth->connect();
$user_auth->SelectDatabase();
$user_auth->result = $user_auth->QueryDatabase("
SELECT *
FROM user
WHERE username = '".$username."'" AND password = '".$password."');
$row = mysql_fetch_array($user_auth->result);
$num = mysql_num_rows($user_auth->result);
if ($num != "0") {
$privilege = $row[3];
$user_auth->LoginStatus($username,'OUT');
$user_auth->LogEntry('O',$username);
$user_auth->PrintBody('Logged out',$row[0]);
session_register("privilege");
session_register("username");
session_unset();
session_destroy();
$user_auth->BackTo();
$user_auth->BodyEnd();
print $SID;
EXIT;
} else {
$user_auth->Warning("You do not exist! go away!");
session_unset();
session_destroy();
EXIT;
}


any1 ?..