Jump to content


Photo

Logout / Kill Session


  • Please log in to reply
2 replies to this topic

#1 glennn.php

glennn.php
  • Validating
  • PipPipPip
  • Advanced Member
  • 251 posts
  • LocationAtlanta, GA USA

Posted 05 May 2006 - 03:40 AM

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:


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


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



#2 glennn.php

glennn.php
  • Validating
  • PipPipPip
  • Advanced Member
  • 251 posts
  • LocationAtlanta, GA USA

Posted 05 May 2006 - 03:51 AM

[!--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) View Post[/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:


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


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


#3 ansarka

ansarka
  • Members
  • PipPipPip
  • Advanced Member
  • 128 posts
  • LocationCochin, Kerala, India

Posted 05 May 2006 - 03:55 AM

[!--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) View Post[/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:


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


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");

EVEN THE WORD IMPOSSIBLE IS SAYING I' M' POSSIBLE




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users