FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » User login status?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: User login status? [message #174491 is a reply to message #174490] Tue, 14 June 2011 21:09 Go to previous messageGo to previous message
Co is currently offline  Co
Messages: 75
Registered: May 2011
Karma:
Member
On 14 jun, 23:00, Luuk <L...@invalid.lan> wrote:
> On 14-06-2011 22:22, Co wrote:
>
>
>
>
>
>
>
>
>
>> Hi All,
>
>> I have this code that will change one field of the users record when
>> he logs in:
>
>> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
>> WHERE id='$id' LIMIT 1");
>
>> This way we can display all the users who are logged in on the main
>> page.
>> When the user logs of the record will be changed again:
>
>> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT 1");
>
>> However what if the user just forgets to log off, then he is gone but
>> his status is still logged=1.
>> Is there a way to make sure the user status is changed even when he
>> forgets to log off?
>
>> Marco
>
> set them to logged='0' when the did not click anywhere on the site for
> the last 5 minutes, or 10 minutes, or whatever you think would be nice...
>
> --
> Luuk

You are right Luuk, it's two fields.
Is there some kind of timer code I need to do that?

Marco
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: radio button change after going to next page
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 06:12:26 GMT 2024

Total time taken to generate the page: 0.05463 seconds