Generating Username And Password

Reply

Join Date: Dec 2006
Posts: 3
Reputation: ValiantHero is an unknown quantity at this point 
Solved Threads: 0
ValiantHero ValiantHero is offline Offline
Newbie Poster

Generating Username And Password

 
0
  #1
Dec 13th, 2006
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!
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 6
Reputation: shift25 is an unknown quantity at this point 
Solved Threads: 0
shift25 shift25 is offline Offline
Newbie Poster

Re: Generating Username And Password

 
0
  #2
Dec 21st, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 1
Reputation: yashrdr is an unknown quantity at this point 
Solved Threads: 0
yashrdr yashrdr is offline Offline
Newbie Poster

Re: Generating Username And Password

 
0
  #3
Jan 30th, 2007
can u explain the coding
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 5
Reputation: unibasic is an unknown quantity at this point 
Solved Threads: 0
unibasic unibasic is offline Offline
Newbie Poster

Re: Generating Username And Password

 
0
  #4
Feb 22nd, 2007
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>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ColdFusion Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC