This script generates a random word 7 letters long plus 4 digits long.
Example code:
<cfset random_word = "">
<cfloop index="ii" from="1" to="7">
<cfset random_number = "#RandRange(1,26)#">
<cfset alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
<cfset random_letter = "#Mid(alphabet,random_number,1)#">
<cfset random_word = "#ListAppend(random_word,random_letter)#">
</cfloop>
<cfset random_word = "#Replace(random_word, ",", "", "ALL")#">
<cfset random_number = "#RandRange(1000,9999)#">
<cfset password = "#random_word##random_number#">
<cfoutput>PASSWORD: <b>#password#</b></cfoutput>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists