Jump to content

Recommended Posts

Hi!

I have a problem with my login system:

When one user (ex. "[b]nero[/b]") makes the login, in sql table "[b]users[/b]" on the user "[b]nero[/b]" i update the column "[b]estado[/b]" to [u]'01'[/u] (means "online") and register is session id in the column "[b]SID[/b]". when he does the logout i set "[b]estado[/b]" to [u]'00'[/u] (means "offline") and the "[b]SID[/b]" to [u]""[/u].

This script allow me to prevent multiple logins with the same username and to have a statistics on my site.

the problem is:
Everyone closes the browser without login, therefore the column "[b]estado[/b]" continues with the value [u]'01'[/u] and "[b]SID[/b]" with the old session_id.

If there's a way to list all the session_id active on the site i can control the users that closes the browser without making the logout.

If that isn´t possible what's another method to check this? (i've read that we can do that with time control, but if you set that time to 10 min., and the user makes the login and closes the browser (ex. in the first minute), then when returns to the site we can't make the login and have to wait 9 minutes...

Any ideias??

Thanks

P.S.: Sorry for my poor english..
Link to comment
https://forums.phpfreaks.com/topic/10220-sid/
Share on other sites

But i already control the users account, the problem is i set a value to '01' when user logins and to '00' when he logouts, but generally they just close the browser.. and the value continues '01' (wich indicates that the user is online)..

when they return to the page and try to make the login they can't because the script assume that he's already logged in..

I want a way to know the users currently online (SID or IP), is there any way to do this?

Thanks
Link to comment
https://forums.phpfreaks.com/topic/10220-sid/#findComment-38427
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.