There are many ways to do it. There are custom tags to do it. Just to show
how easy it is, here is a random password generator you can do what you want
with:
watch for the text wrapping! The textstring is one line. You can make this a
custom tag if you want.
-------------CF Code-------------
<!--- create this string with random values (make sure there are no string
values you don't want --->
<!--- make it long so that you create randomised letters --->
<cfset textstring =
"kljhw4+e-_5987s!df898+fs.gnOI$SUDFN!9A+87GFN_ASDF$!M09AYSFYA09S.$DF_PLAOQWO
I=ZM$NXC$KJ=J!KURU=+TK-JSDHGFJ-UYATWBlkajsdf098a0984ngagsalkj0923845jknlvmap
sd98rqpo32$!sldfkj87.">
<!--- set password to nothing --->
<cfset pw = "">
<!--- randomize the random number generator (this extra bit really
randomizes it) --->
<cfset temp = Randomize(Right(GetTickCount()*57,6))>
<!--- create a string of between 8 and 12 characters --->
<cfloop from="1" to="#RandRange(8,12)#" index="i">
<cfset pw = pw & Mid(textstring, RandRange(1, len(textstring)), 1)>
</cfloop>
<!--- output password --->
<cfoutput>#pw#</cfoutput>
-------------CF Code-------------
Paul
> -----Original Message-----
> From: Shane Witbeck [mailto:[EMAIL PROTECTED]]
> Sent: 02 November 2000 13:59
> To: CF-Talk
> Subject: generating random passwords for a db field
>
>
> What is the BEST way to generate random passwords to populate an
> existing field in a db. I tried using the RandRange(1, 10000)
> function to do this but wound up generating the same random
> number for every record instead of a different random number for
> every record.
>
> The passwords generated do not nec. have to be a number, it could
> be alphanumeric.
>
> TIA
>
> Shane Witbeck
> ------------------------------------------------------------------
> ------------------------------
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> or send a message with 'unsubscribe' in the body to
> [EMAIL PROTECTED]
>
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]