SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: php sessions and cookies
-
Aug 17, 2000, 07:44 #1
- 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
-
Aug 17, 2000, 11:14 #2
- 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."
-
Aug 17, 2000, 12:32 #3
- 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