Jump to content

Archived

This topic is now archived and is closed to further replies.

glennn.php

Logout / Kill Session

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

Share this post


Link to post
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

Share this post


Link to post
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");

Share this post


Link to post
Share on other sites

×

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.