Deleting Session On Closing Browser Tab

Discussion in 'PHP' started by rendra_mm2, Aug 18, 2009.

  1. rendra_mm2

    rendra_mm2 New Member

    Joined:
    Jul 10, 2009
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Freelancer
    Home Page:
    http://rendramm2.wordpress.com
    Hei all,,, please help me ,,, :happy:

    1. How i can close opened tab / window (not popup) in firefox ...
    2. Deleting session on this tab when we close it ...

    My Logout script :


    1. <? require_once("config.php");
    2. $unique_id = session_id();
    3. session_regenerate_id();
    4. $qry="delete from cart_table where unique_id='$unique_id'";
    5. mysql_query($qry);
    6. $_SESSION = array();
    7. session_unset();
    8. session_destroy();
    9. header("Location:index.php");
    10. ?>
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Probably that is not possible but you can have a time out which should do the job
     
  3. nimesh

    nimesh New Member

    Joined:
    Apr 13, 2009
    Messages:
    769
    Likes Received:
    20
    Trophy Points:
    0
    Occupation:
    Oracle Apps Admin
    Location:
    Mumbai
    Home Page:
    http://techiethakkar.blogspot.com
    window.close() does not help you?
    or
    you don't want it in html?

    deleting session on a tab?
    that should happen
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice