creating unique id.
Posted: Wed Jun 19, 2002 11:27 am
This is my situation.
I have designed an online questionnaire, as a reward for filling in the questionnaire there are entitled to a discount when they attend an event.
Any ideas on how I might go about generating a unique id for each person that fills in the questionnaire.
I was thinking of using their firstname then autoincrement the end thus: andrew01 and so on.
The problem with this is that people might but spaces or funny characters in their first name. Thus I was thinking it might be better to generate a random string of alpha characters and then auto increment the end.
Like SDFSFF01, SDFPPF02 And on on.
Any help with the code would be most excellent. But if you have a better solution then I'd be thankful to hear your ideas.
Andi
I have designed an online questionnaire, as a reward for filling in the questionnaire there are entitled to a discount when they attend an event.
Any ideas on how I might go about generating a unique id for each person that fills in the questionnaire.
I was thinking of using their firstname then autoincrement the end thus: andrew01 and so on.
The problem with this is that people might but spaces or funny characters in their first name. Thus I was thinking it might be better to generate a random string of alpha characters and then auto increment the end.
Like SDFSFF01, SDFPPF02 And on on.
Any help with the code would be most excellent. But if you have a better solution then I'd be thankful to hear your ideas.
Andi