User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Dec 2006
Posts: 3
Reputation: ValiantHero is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ValiantHero ValiantHero is offline Offline
Newbie Poster

Generating Username And Password

  #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!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2006
Location: Orange County, CA
Posts: 5
Reputation: shift25 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
shift25 shift25 is offline Offline
Newbie Poster

Re: Generating Username And Password

  #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  
Join Date: Jan 2007
Posts: 1
Reputation: yashrdr is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
yashrdr yashrdr is offline Offline
Newbie Poster

Troubleshooting Re: Generating Username And Password

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

Re: Generating Username And Password

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ColdFusion Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ColdFusion Forum

All times are GMT -4. The time now is 12:08 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC