----- Original Message ----- From: "Steve Miller" > The problem is when someone closes their browser > or simply lets the cookie expire, the database is not > updated and now holds IDs of non logged-in users. > Any creative suggestions as to how to get around > this problem?
Keep a db field for 'last activity' that gets updated every time a page is loaded in that session. So when you look at the db, the only users currently logged-in are those with a 'last activity' time = t or greater, where t = now - session timeout. You can either tidy up the db manually from time to time, or add a bit of code to the login page that evry time someone logs in, deletes all expired records from the database (delete * from users where last-active < t) ____ � The WDVL Discussion List from WDVL.COM � ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To set a personal password send an email to [EMAIL PROTECTED] with the words: "set WDVLTALK pw=yourpassword" in the body of the email. To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
