sessions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • megahard
    Senior Member
    • Aug 2001
    • 459

    sessions

    what is the point in sessions?

    you have to store the session ID in a cookie most of the time anyway, so why not just store the user's ID and password hash in a cookie, and compare them?


    can someone talk me through ste by step how you use a session for something like a forum?
  • ryany
    Member
    • Nov 2000
    • 95

    #2
    If i remember correctly. Sessions only last as long as the browser is open and session is deleted immediatly once the browser is closed. Sessions are not stored in a txt file in the users comp... I think .

    Comment

    • GanjaWip
      New Member
      • Aug 2002
      • 1

      #3
      Year sessions only last until the browser is closed, but since PHP 4.2.x you can define the time (in minutes) the session lasts :

      "session_cache_expire() returns current cache expire. If new_cache_expire is given, the current cache expire is replaced with new_cache_expire." (in PHP Manual for 4.2.2)

      But instead of using standard PHP sessions you can program your own system (using a database for e.g.) and store only the session ID in a cookie. Why not try this ? (this is how vBulletin is made i think, as they store "bblastvisit", "bbuserid" and "bbpassword" in their cookie).


      I'm currently doing a forum too, and i've decided to store the member id AND the member password (encoded) in the cookie, so there is no pb, and i don't need any sessions

      Comment

      • megahard
        Senior Member
        • Aug 2001
        • 459

        #4
        i think i'll stick to good ol' cookies too

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...