Where do I store the information that says a user is logged in?

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 1101 Views - Last Post: 03 February 2012 - 11:34 PM Rate Topic: -----

Topic Sponsor:

#16 logicPwn  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 03-February 12

Re: Where do I store the information that says a user is logged in?

Posted 03 February 2012 - 11:34 PM

This is my own login logic for cookies. Sessions are not editable by users as said above. In my table I make a row for UUID and use uniqid(); to have PHP generate a unique key. Then I store the users name and UUID in cookies and store the unique ID in the DB. Then in your script make sure the UUID matches with the cookie. There is no way for them to insert the UUID in the DB without some other flaw in your script.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2