Hi,
I wonder if someone could tell me what I am doing wrong with the
following? I am trying to end a session (logout), but am having a
problem...
I register a new session as follows:
authenticate.php (snippet)
----------------------------
// if the user has just tried to login
if ($username && $password)
{
// if the user is present in the database, register the username in
the session
if (login($username, $password)==1)
{
$valid_user=$username;
session_register("valid_user");
}
}
----------------------------
^ This works okay. BTW, session_start() is present - just not shown
above. I then have a hyperlink to a logout function:
logout.php (snippet)
----------------------------
session_start();
include("sasdap_fns.php");
$result = session_unregister("valid_user");
session_unset();
session_destroy();
----------------------------
^ $result always returns "1", but when I return to /reload /refresh the
login screen I see that I am still logged in i.e. the session is still
active.
Can anyone see a problem anywhere? Thanks very much in advance.
- Best regards,
Lee
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]