rascle Posted December 5, 2010 Share Posted December 5, 2010 Hi I am trying to create a "User logged" function that tells the database when the user was logged in, I have heard about creating a time out for this, but dont have any idea how to do it or what it does! Any one have any ideas? Thanks Rhys Quote Link to comment Share on other sites More sharing options...
monkeytooth Posted December 5, 2010 Share Posted December 5, 2010 Theres no "time out" per say, not automatic at least (i don't think, i could be wrong). Only way to really do something is upon login set a DATETIME style timestamp somewhere. Be it via session, in a column on the table, whatever. And while the user is active have it regularly update that timestamp. But only updating it if the one stored however you stored it is still less than the current time. Or set timestamp 15 or 20 minutes in the future and if the time() now is greated than the time stamp stored the login expires, and the timestamp doesnt update. I know this is all a bit vague, but im half asleep right now waiting on help to something I am stuck on. Hopefully I make more sense then I think I am currently being tired like this and trying to make sense is a bad combination. Anyway good luck Quote Link to comment Share on other sites More sharing options...
rascle Posted December 5, 2010 Author Share Posted December 5, 2010 I still not sure on how to do it, but thanks anyway. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.