Jump to content

Logout / Kill Session


glennn.php

Recommended Posts

i have this login script but the author provided no logout feature - i'd like to be able to kill the session without the user having to close his browser:

[code]

if (!$errortag){
    session_register("CID");
    $_SESSION["CID"] = $customerid;
    $CID = $customerid;
    $showtable = false;
}

[/code]

can anyone help? have i provided enough info?

I know this is simple - the reason i love these forums is that ya'll can't see me turn red in embarrassment at such times...

thanks,
g

Link to comment
Share on other sites

[!--quoteo(post=371447:date=May 4 2006, 11:40 PM:name=glennn.php)--][div class=\'quotetop\']QUOTE(glennn.php @ May 4 2006, 11:40 PM) [snapback]371447[/snapback][/div][div class=\'quotemain\'][!--quotec--]
i have this login script but the author provided no logout feature - i'd like to be able to kill the session without the user having to close his browser:

[code]

if (!$errortag){
    session_register("CID");
    $_SESSION["CID"] = $customerid;
    $CID = $customerid;
    $showtable = false;
}

[/code]

can anyone help? have i provided enough info?

I know this is simple - the reason i love these forums is that ya'll can't see me turn red in embarrassment at such times...

thanks,
g
[/quote]



figured it out, thanks
Link to comment
Share on other sites

[!--quoteo(post=371447:date=May 4 2006, 10:40 PM:name=glennn.php)--][div class=\'quotetop\']QUOTE(glennn.php @ May 4 2006, 10:40 PM) [snapback]371447[/snapback][/div][div class=\'quotemain\'][!--quotec--]
i have this login script but the author provided no logout feature - i'd like to be able to kill the session without the user having to close his browser:

[code]

if (!$errortag){
    session_register("CID");
    $_SESSION["CID"] = $customerid;
    $CID = $customerid;
    $showtable = false;
}

[/code]

can anyone help? have i provided enough info?

I know this is simple - the reason i love these forums is that ya'll can't see me turn red in embarrassment at such times...

thanks,
g
[/quote]


if you want to kill all session varibles you can use

session_destroy();

If you want to kill only one variable you can use
session_unregister("CID");
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.