poolhustler86 Posted January 15, 2007 Share Posted January 15, 2007 Hey People,Hopefully someone can help point me in the right direction.I require a unique number created by the rand fuction (perferable numbers) for each visitor who visits the website so i can store there shopping cart / quotation cart information within the database.I would require to store the unique number created within the database in a table called unique_ids for the rand function to crosscheck that the number to a visitor is not one already exisiting on the system.If it exisits to recreate a new number until it does not exisit....Is there any easier way to create a unique id to store this info? Does the session id in php suppy different visitors a unique session onto the website?Any suggestions / ideas would be most helpful...Thankyou Quote Link to comment Share on other sites More sharing options...
OOP Posted January 15, 2007 Share Posted January 15, 2007 session ID will be enough....no need to create your own unique number if you are using the session managment functions Quote Link to comment Share on other sites More sharing options...
poolhustler86 Posted January 15, 2007 Author Share Posted January 15, 2007 So that will keep everything unique for each time a visitor comes? even page after page? Quote Link to comment Share on other sites More sharing options...
OOP Posted January 15, 2007 Share Posted January 15, 2007 I did not get your question....Do you mean in each page you want to create a unique ID??or one unique ID for each visitor in all pages? Quote Link to comment Share on other sites More sharing options...
poolhustler86 Posted January 15, 2007 Author Share Posted January 15, 2007 One unique id for the whole time they are on the site.... when they leave and then they come back they get a new one.... Quote Link to comment Share on other sites More sharing options...
OOP Posted January 15, 2007 Share Posted January 15, 2007 then yes session ID is enough for you Quote Link to comment Share on other sites More sharing options...
poolhustler86 Posted January 15, 2007 Author Share Posted January 15, 2007 thankyou for ur assistance... i will try that at the office tomorrow :) kinder just getting my head around php / sessions still :) 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.