poolhustler86 Posted October 25, 2006 Share Posted October 25, 2006 Stupid Question Most Likely,With php sessions, no session comes out duplicate on different computers? I'm trying to build a session based online storefront to keep the customers products they wish to buy within a database in a shopping cart table.I wouldnt want another customer on a different computer to have the same session id. This is a stupid question.Or would there be a way of storing a unique value per each customer who visits the site first without the customers having to login / join up?Help would be apprecaited. Quote Link to comment Share on other sites More sharing options...
Stooney Posted October 25, 2006 Share Posted October 25, 2006 Well you could try something like rand() with encode(). Generate their 'id' then check to see if that id is being used, if so try again. Quote Link to comment Share on other sites More sharing options...
poolhustler86 Posted October 25, 2006 Author Share Posted October 25, 2006 Would that method cater for millions of users? millions of hits / traffic by customers?As customers could just click out of the site and it wouldnt delete the record from mysql.Would i be able to get away maybe with the use of rand() with a date/time function stating the time they visited the site and after a day / week delete the rows relating to previous dates.Would that allow me to use rand() on a constant basis?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.