|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
session_id
my projects is about build a questionnaire,
when user put their quetionnaire data, so i must ive them an unique id..' how could i give them the id without using session_id. i like to give an unique id with only number..not '13d4e68' because, when i'm using session id..i wil return a warning... |
|
#2
|
|||
|
|||
|
You could use the mt_srand() and mt_rand() function for creating the user id itself. If you have access to a database you can use the auto_increment option on a column, which will generate unique id's (it gets incremented, right
)PHP Code:
That code above should generate pretty random numbers. I have set up a page where you can test changing the max value of the mt_rand() function. It puts 10 000 values using the mt_rand() function in an array, and then removes the duplicates. It lets you see how many duplicates there are. http://kbase.webpixels.net/randomnumber.php Uh, I think that's all I had to say.. ![]()
__________________
Best Regards, Håvard Lindset Last edited by Lindset : August 4th, 2002 at 01:31 AM. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > session_id |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|