This is a discussion on "Help with login script (session/cookie)..." within the PHP Forum section. This forum, and the thread "Help with login script (session/cookie)... are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Help with login script (session/cookie)...
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Help with login script (session/cookie)...
Hi, I was wondering if somebody could help me with my LOGIN script!
This is mostly from a tutorial, but I canīt seem to make it do what I want. I would like for the user so be able to sign in and stay signed in for 6 hours. Right now, when user logs-in he STAYS logged in as long as he doesn't leaver the root page or sub-pages. If he visits Google in the same browser window/tab and goes back the user isn't logged in anymore. Hoe can I fix these issues with the code below? ISSUE 1 - User stays logged in when leaving site / closing browser. ISSUE 2 - User signs out when session is over. When on or off site. Hereīs my LOGIN page code:
|
|
|
|
||||
|
Re: Help with login script (session/cookie)...
You can log the user out with session_destroy(); But you cannot choose how long the cookie remains on their computer really.
The client's browser has control over the cookie's expiration.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: Help with login script (session/cookie)...
Quote:
But what about pages like this one, that keeps me logged in if I check the Remember me button? Based on this tutorial, this should be possible. Quote:
|
|
||||
|
Re: Help with login script (session/cookie)...
The above tutorial you have linked to does work, I have used it in the past.
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| login script | mbarr | Databases | 13 | Mar 12th, 2008 03:39 |
| login script help | Aaron1988 | PHP Forum | 2 | Oct 25th, 2006 15:03 |
| Login Script... something wrong! | snowangel | PHP Forum | 6 | Mar 6th, 2006 15:27 |
| PHP Login script advice | chimp | PHP Forum | 1 | Dec 21st, 2005 17:16 |
| client login script? | godonlyknows | PHP Forum | 6 | Jul 23rd, 2005 17:47 |