943,749 Members | Top Members by Rank

Ad:
  • ColdFusion Discussion Thread
  • Unsolved
  • Views: 4624
  • ColdFusion RSS
Dec 13th, 2006
0

Generating Username And Password

Expand Post »
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!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ValiantHero is offline Offline
3 posts
since Dec 2006
Dec 21st, 2006
0

Re: Generating Username And Password

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
shift25 is offline Offline
6 posts
since Dec 2006
Jan 30th, 2007
0

Re: Generating Username And Password

can u explain the coding
Reputation Points: 10
Solved Threads: 0
Newbie Poster
yashrdr is offline Offline
1 posts
since Jan 2007
Feb 22nd, 2007
0

Re: Generating Username And Password

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>
Reputation Points: 10
Solved Threads: 0
Newbie Poster
unibasic is offline Offline
5 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ColdFusion Forum Timeline: problem launching administrator
Next Thread in ColdFusion Forum Timeline: Scheduled tasks will not run





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC