Jump to content

Galgoran

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Galgoran's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you both for your help, this will make things a great deal easier.
  2. Hey, everyone. I'm fairly new with PHP, though I can work my way around the basics quite well. I hope I've put this in the right place. If I need to provide any information in order to get help, I'll be happy to provide it. Right now I'm rewriting my website's login page essentially from scratch in order to deal with several problems. First and foremost of these, I mean to prevent people from being logged in multiple times with the same account (and with different accounts, if it's on the same computer). Now, I've thought it over, and the way I've seen myself doing it is this: - When the login form is submitted, select the session ID currently stored in the login table (where stored IP = current IP?). - Unset the session with that ID. - Upload the current session ID to the database with other info, ready for the process to repeat itself with the next login. Since there is an include checking the user's session to see whether they're logged in at the top of every page beyond login, unsetting the user's session would send him to the login page. It seems like solid reasoning to me, but unfortunately, I don't know quite enough about sessions to make it work. (For example: if the user is trying to log on two accounts from the same computer, would the session ID being used at login be the same as the session ID being used by the account already logged on?) What I want to know, I suppose, is: - whether or not this is a valid plan. - How I would go about unsetting the previous session by its ID (I would assume this is possible, but I may be mistaken) - What sort of changes would need to be enacted to prevent two people logging onto the same account, at the same time, from different computers.
×
×
  • 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.