[Webinar] Streamline your web hosting managementRegister Today


Creating a unique user ID for shopping card!!

Posted on 1999-12-05
Medium Priority
Last Modified: 2010-03-05

  I am trying to create a shopping card that it will create a unique user for user ( for example: date+random number )when he tried to access to shopping card and no matter how many time he/she moved back and forwad , that unique number (just create one time ) and no allow keep assign unique id ( so it need to save in some place ) .

 Of course, the easy way...using cookies!! but my boss requested "no to use cookies", because some users disable the cookies in their browsers.

 So where or how to put the unique id assign for each user.

 Perfect example: Amazon ....www.amazon.com, you can see that after the home.html : http://www.amazon.com/exec/obidos/subst/home/home.html/002-8684941-3777048..appears the source id which it is unique and it will keep for u ..while you move back and forward.

 I would appreciate any help!!

 Thank you very much.

Question by:canarioperl

Author Comment

ID: 2257372
Edited text of question.
LVL 85

Accepted Solution

ozo earned 150 total points
ID: 2257688
print "<input type=hidden name=id value=",time,$$,">";

Expert Comment

ID: 2553790
I use this one:
my @chars = (0 .. 9, 'A' .. 'Z', 'a' .. 'z');
($sessid  =  0 x (shift || 15)) =~ s/0/$chars[rand @chars]/ge;
where 15 is the length of the string.



Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Article by: Tammy
MySQLTuner is a script written in Perl that allows you to review a MySQL installation quickly and make adjustments to increase performance and stability. The current configuration variables and status data is retrieved and presented in a brief forma…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question