Random Reference

# Thread: Random Reference

1. Senior Member
Join Date
Dec 1969
Posts
226

## Random Reference

How can I create a random reference number on a confirmation form<BR>that has to created when an order is being placed?<BR><BR>thanks in advance!

2. Senior Member
Join Date
Dec 1969
Posts
168

## RE: Random Reference

I use this function to generate random user passwords, but you may find it useful. <BR>(FYI: Capital & Lowercase I&#039s, L&#039s, Capital O&#039s and the numbers 1 and 0 are excluded -- to aviod confusion.)<BR><BR>&#060;%<BR>Function makepwd(s)<BR>Dim A<BR>A = Array("A","a","B","b","C","c","D","d","E","e","F", "f","G","g","H","h","J","j","K","k","M","m","N","n ","o","P","p","Q","q","R","r","S","s","T","t","U", "u","V","v","W","w","X","x","Y","y","Z","z","2","3 ","4","5","6","7","8","9")<BR>makepwd = ""<BR>for i=1 to s<BR> Randomize<BR> var= INT((54 * RND) + 1)<BR> makepwd= makepwd & A(var)<BR>next<BR>End Function<BR><BR>Response.Write("The Confirmation Number is is: " & makepwd(10) & "&lt;br&gt;")<BR>%&#062;<BR><BR>(Just pass the makepwd function the number of characters you want the &#039string&#039 to be.)<BR><BR>Hope this helps... Cheers!

#### Posting Permissions

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