•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 402,369 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,074 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser: Programming Forums
Views: 3536 | Replies: 3
![]() |
•
•
Join Date: Dec 2006
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
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!
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!
•
•
Join Date: Dec 2006
Location: Orange County, CA
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
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.
•
•
Join Date: Jan 2007
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
I’ll give you the basics:
Form Page:
<cfform action="CreateStuff.cfm" method="POST">
<cfinput type="text"
name="FName"
required="yes"
message="Please enter you First Name"
size="30"
maxlength="30">
<cfinput type="text"
name="LName"
required="yes"
message="Please enter you Last Name"
size="30"
maxlength="30">
<cfinput type="text"
name="EmailTo"
validate="email"
required="Yes"
message="Please enter a valid Email Address"
size="60"
maxlength="60">
<input type="submit" name="btnSubmit" value="Save">
</cfform>
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"
to="#trim(Form.EmailTo)#"
from="dude@america.com"
subject="Thank you for registering with our web site"
Your user ID is <cfoutput>#UserName#</cfoutput>
Your Password is <cfoutput>#Password#</cfoutput>
</cfmail>
Form Page:
<cfform action="CreateStuff.cfm" method="POST">
<cfinput type="text"
name="FName"
required="yes"
message="Please enter you First Name"
size="30"
maxlength="30">
<cfinput type="text"
name="LName"
required="yes"
message="Please enter you Last Name"
size="30"
maxlength="30">
<cfinput type="text"
name="EmailTo"
validate="email"
required="Yes"
message="Please enter a valid Email Address"
size="60"
maxlength="60">
<input type="submit" name="btnSubmit" value="Save">
</cfform>
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"
to="#trim(Form.EmailTo)#"
from="dude@america.com"
subject="Thank you for registering with our web site"
Your user ID is <cfoutput>#UserName#</cfoutput>
Your Password is <cfoutput>#Password#</cfoutput>
</cfmail>
![]() |
•
•
•
•
•
•
•
•
DaniWeb ColdFusion Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Lost Windows XP user password (Windows NT / 2000 / XP / 2003)
- Missing username and password field - Novell (Novell)
- Lost Username & Password (Network Security)
- email assigned to username on submit (MySQL)
- website password protection (JavaScript / DHTML / AJAX)
- Forwarding ports, stuck at the password stage -- nothing works. (Networking Hardware Configuration)
- My PC won't remember or ask for password recall (Windows NT / 2000 / XP / 2003)
Other Threads in the ColdFusion Forum
- Previous Thread: problem launching administrator
- Next Thread: Scheduled tasks will not run


Linear Mode