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 Link to comment https://forums.phpfreaks.com/topic/34223-unique-number-session-related/ 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 Link to comment https://forums.phpfreaks.com/topic/34223-unique-number-session-related/#findComment-160988 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? Link to comment https://forums.phpfreaks.com/topic/34223-unique-number-session-related/#findComment-160990 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? Link to comment https://forums.phpfreaks.com/topic/34223-unique-number-session-related/#findComment-160994 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.... Link to comment https://forums.phpfreaks.com/topic/34223-unique-number-session-related/#findComment-160995 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 Link to comment https://forums.phpfreaks.com/topic/34223-unique-number-session-related/#findComment-161000 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 :) Link to comment https://forums.phpfreaks.com/topic/34223-unique-number-session-related/#findComment-161001 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.