|
||||||
| PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
I use sessions to log in users. When the user logs in I update a table to 1 and once logged out it is set back to 0. The reason I did it this way was to avoid using cookies.
My problem is that when someone closes the browser it doesn't set that flag back to 0. They are still logged in. Any ideas on how to log these users out? Should I set an activity stamp and check against that? |
| Sponsored Links |
|
|
|
|||
|
I believe the time stamp would work. If they were not active for over 30 minutes or so then you could remove it. You could create a variable or time stamp in your DB. Everytime they move to a new page the time stamp gets reset so you can determine if they are active or not.
__________________
Hi >> Saint |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP 4 end of life announcement | Jordan | Programming News | 4 | 08-30-2007 10:55 AM |
| PHP Introduction | clookid | PHP Tutorials | 10 | 01-16-2007 08:17 AM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |
Goal: 100,000 Posts
Complete: 98%