session cookies

Discussion in 'PHP' started by bartolay13, Jan 8, 2008.

  1. #1
    need help on cookies...

    how can i destroy the session(and the cookies) without undergoing into a session_destroy.

    any quick scripts or some methods on this??

    thanks.
     
    bartolay13, Jan 8, 2008 IP
  2. jwlnewsome

    jwlnewsome Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    how about
    unset($_session);
     
    jwlnewsome, Jan 8, 2008 IP
  3. LittleJonSupportSite

    LittleJonSupportSite Peon

    Messages:
    386
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do NOT unset the whole $_SESSION with unset($_SESSION) as this will disable the registering of session variables through the $_SESSION super global.

    So basically don't do:
    
    unset($_SESSION)
    
    Code (markup):
    Instead do:
    
    $_SESSION = array();
    
    Code (markup):
     
    LittleJonSupportSite, Jan 8, 2008 IP