i'm working on building a user object for a website I'm working on. In the user object, userid and sessionid must be stored into a cookie and then sent to the user. The userid and sessionid along with info about the user(IP, username, etc) are inserted into a MySQL DB. I'm looking for a way to generate a random, unique sessionid that PHP can make, store in the DB, insert into that cookie, and can also use to look up a user in the DB. So what's the best way to generate a random, unique session ID with PHP??
Best way to generate Random, Unique Session ID's