I'm a high school student with very littlecoding experience. I was given an assignment without any real direction as to how to do this.

I'd like to know exactly how i'm suppose to Create a page to allow users to give their first and last names along with their email, then after clicking submit, the site will auto generate their username: First letter of their name and then their full last name. ex. Carl Flanigan = CFlanigan. and auto generate a password as a random string of numbers and Email it to them.

Normally I wouldn't ask for help but my teacher is unfortunately useless and attempting, without result, to keep the other students off internet games.

I'd appreciate it if you could explain how the code works, as i've tried many things and failed for my trouble.

Much obliged!

Why dont you show us what you have so far? It sounds to me like you need 3 input boxes and a submit button, then have it crunch what the user input. Coding the inputs isnt that hard. Try even searching macromedia/adobe's reference online. Once you get that, I'll be more willing to help, as I am sure others here will too.

I’ll give you the basics:

Form Page:

<cfform action="CreateStuff.cfm" method="POST">

<cfinput type="text"
message="Please enter you First Name"

<cfinput type="text"
message="Please enter you Last Name"

<cfinput type="text"
message="Please enter a valid Email Address"

<input type="submit" name="btnSubmit" value="Save">


You could use a table for balance . . . or not. All validation is done on the client side.

Action Page: (Also called CreateStuff.cfm)

<cfset UserName = #Left(Form.FName,1)#> <!--- Extract the first letter of name -à
<cfset UserName = #UserName# & #Form.LName#> <!--- Whole user name -à
<cfset PassWord = GetTickCount()> <!--- current value of internal millisecond timer -à
<cfmail type="html"
subject="Thank you for registering with our web site"

Your user ID is <cfoutput>#UserName#</cfoutput>
Your Password is <cfoutput>#Password#</cfoutput>


This article has been dead for over six months. Start a new discussion instead.