Jump to content

Archived

This topic is now archived and is closed to further replies.

neropt

SID

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..

Share this post


Link to post
Share on other sites
And how do i know if the user is really th owner of the account??

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
that or put a time limit on the login. So, instead of a 01, you'd just put the current time. If it's older than, say, fifteen minutes, then consider them off.

Share this post


Link to post
Share on other sites

×

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.