Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2009
    Posts
    48
    Thanks
    28
    Thanked 0 Times in 0 Posts

    logout destroy session

    Hi,

    I am having some trouble ending/destroying a session I have tried using the following but I can still press that back button and I'm still logged in.

    <?php
    Session.Abandon()
    ?>

    also unset, and destroy.

    Any ideas how to destory the session so I can't press the back button and get back in.

    Thanks in advance

  • #2
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    i think you need session_start() before you call session_destroy() so it knows which one you want to kill

  • Users who have thanked ohgod for this post:

    tau9 (03-30-2009)

  • #3
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 1 Time in 1 Post
    session_start() is what starts a session. There are ways around this but generally this will need to be at the top of each page. To destroy a session simply call session_destroy(). That will get rid of your session and eliminate all session variables as well.

  • Users who have thanked businessman2000 for this post:

    tau9 (03-30-2009)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •