Jump to content


Photo

SID


  • Please log in to reply
6 replies to this topic

#1 neropt

neropt
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 22 May 2006 - 10:37 PM

Hi!

I have a problem with my login system:

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

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 "estado" continues with the value '01' and "SID" 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..

#2 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 23 May 2006 - 05:07 AM

Maybe this is too simple. Give them the option to kick off the previous login.

#3 neropt

neropt
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 24 May 2006 - 12:41 AM

And how do i know if the user is really th owner of the account??

#4 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 24 May 2006 - 12:57 AM

umm... well, that's what the login script itself is for... to validate the user...
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#5 neropt

neropt
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 24 May 2006 - 01:11 AM

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

#6 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 24 May 2006 - 01:37 AM

perhaps you can use ajax with an onclose function to update the number?
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#7 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 24 May 2006 - 01:52 AM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users