SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm trying create a login script that keeps the visitor loged in each time he/she visits the site, so they wouldn't need to log in each time. I cannot change php.ini to increase expiration time, which is at 0 right now, because I'm on a virtual hosting plan. Is there a way I can I cookie functions to set a variable to remember the visitor? Any other ideas about how I can keep people loged in across multiple visits?

    Thank you,
    Lenny

  2. #2
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    If you mean the expiration time for Sessions then you can change that with this function: session_set_cookie_params( 3600 * 24 * 365 ) - in this example the session would be set to expire after 1 Year (3600 seconds * 24 hours * 365 days), also take a look at sessions in the PHP manual.

    ------------------
    Karl Austin
    KDA Web Services
    "Everyone has a photographic memory. Some just don't have film."

  3. #3
    SitePoint Member
    Join Date
    Aug 2000
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That just lasts till the end of the execution of the script doesn't it?


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
  •