shopping cart id

Results 1 to 3 of 3

Thread: shopping cart id

  1. #1
    Join Date
    Dec 1969

    Default shopping cart id

    Anyone have any idea how to generate a random shopping cart id with letters? For the number part, I&#039ll use random-does anything exist like that for letters?<BR>Thanks in advance.

  2. #2
    BalletChick Guest

    Default RE: shopping cart id

    What is it today with this question? Why does it have to be letters?<BR><BR>Ahh well... here&#039s something that may help. This code will generate a five-byte random string (this would best be utilized as a function, by the way...):<BR><BR>&lt;%<BR>dim intX, intMaxLen, intRand, strRand<BR>intMaxLen = 5 &#039 Let&#039s say we want a five-character string<BR>randomize<BR>strRand = "" &#039 Because who knows how you&#039re going to use this code?<BR>for x = 1 to intMaxLen<BR>&nbsp;&nbsp;&nbsp;intRand = int((rnd * 26))<BR>&nbsp;&nbsp;&nbsp;strRand = strRand & chr(65 + intRand)<BR>next<BR>response.write "Sample code was &#039" & strRand & "&#039&lt;br&gt;"<BR>%&gt;

  3. #3
    Thanks... Guest

    Default RE: shopping cart id

    Why does it have to be letters? Letters just look better. Anyways thanks for your idea, its much appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts