SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot t0m|ta's Avatar
    Join Date
    Mar 2002
    Location
    Madrid - Spain
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Aren't sessions suposed to be temporary?

    I have followed Kevin Yanks, tutorial "Managing Users with PHP sessions and mySQL. And it all works beatyfully, except that I stay logged in forever, no matter where I go, or how many times I delete my cookies, caché, go to other sites. When I go back it says hello tomatoma :-)

    Kevin says "sessions are really just an easy method of creating variables that stick around for the duration of a users stay at your site.

    Well, my users can go and Have a drink somewhere else, when they come back they are still logged in

    The code, is the exactly the same as in the tutorial XD

  2. #2
    And your point is.... redgoals's Avatar
    Join Date
    Feb 2002
    Location
    Birmingham, UK
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you need to use session_destroy(). So when a user currently logged in to a session will be removed when they visit a page with that at the top.

    For more info visit the manual.

    http://www.php.net/session
    Last edited by redgoals; Apr 7, 2002 at 13:15.
    http://redgoals.com ... my site ... nuff said

  3. #3
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you close the window, and then go back you will have to re-signin!

  4. #4
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by redgoals
    you need to use session_destroy(). So when a user currently logged in to a session will be removed when they visit a page with that at the top.

    For more info visit the manual.

    http://www.php.net/session

    Would sesions_unregister() work?

  5. #5
    And your point is.... redgoals's Avatar
    Join Date
    Feb 2002
    Location
    Birmingham, UK
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes

    session_unregister('variable')
    http://redgoals.com ... my site ... nuff said

  6. #6
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I figured that out, by testing it!

    Thanks,
    ~someonewhois

  7. #7
    SitePoint Zealot t0m|ta's Avatar
    Join Date
    Mar 2002
    Location
    Madrid - Spain
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the hints,

    I'll read the manual and give it a try tonight :-)

    I'll tell you how it comes out

    Best regards


Bookmarks

Posting Permissions

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