•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 361,909 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 2,562 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:
Views: 4437 | Replies: 3
![]() |
•
•
Join Date: Oct 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I want to create this website and need to know (Language) how I can get started. I am a newbie in coding. The below are the foloowing I need to get started on:
Admin login ( I want an administrator to be able to login on any pc and edit users)
Users registation.( I want users to be able to register and use a psw each time they access the site)
You help will be appreciated. Thanks in advance.
Admin login ( I want an administrator to be able to login on any pc and edit users)
Users registation.( I want users to be able to register and use a psw each time they access the site)
You help will be appreciated. Thanks in advance.
•
•
Join Date: Nov 2005
Location: Massachusetts
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 0
Check out the structure they offer over at cfmsource:
http://www.cfmsource.com/pages/cfwebsite.cfm
http://www.cfmsource.com/pages/cfwebsite.cfm
•
•
Join Date: Apr 2005
Location: Ontario, Canada
Posts: 24
Reputation:
Rep Power: 4
Solved Threads: 1
This is just for User Registration
<cfparam name="FORM.name_first" default="" />
<cfparam name="FORM.name_last" default="" />
<cfparam name="FORM.email" default="" />
<cfset bRegistrationSuccess = false />
<cfif IsDefined('FORM.register_button.y') AND FORM.password NEQ FORM.password_confirm> do the pws match?
<cflocation url="password_confirm.cfm" />
<cfelseif IsDefined('FORM.register_button.y')>
<cfquery name="qUserCheck" datasource="dsn">
SELECT *
FROM db_name
WHERE user_name = '#FORM.userid#'
</cfquery>
<cfif qUserCheck.RecordCount NEQ 0> is the user name already taken?
<cflocation url="userid_confirm.cfm" />
<cfelse>
<cfquery datasource="dsn">
INSERT INTO table_name(user_name, user_first, user_last, join_date, password, email)
VALUES('#FORM.userid#', '#FORM.fname#', '#FORM.lname#', '#FORM.date#', '#FORM.password#', '#FORM.email#')
</cfquery>
<cfset bRegistrationSuccess = true />
</cfif>
</cfif>
this is the form you would use for your user registration
<cfif NOT bRegistrationSuccess>
<cfform action="#CGI.SCRIPT_NAME#" name="register" method="POST">
<table width="500" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td colspan="2" class="style3"><div align="center">Registration Form </div></td>
</tr>
<tr>
<td class="style3" width="200">User ID </td>
<td><cfinput type="text" name="userid" required="yes" message="Please enter a User ID" /></td>
</tr>
<td class="style3" width="200">First Name </td>
<td><cfinput type="text" name="fname" required="yes" message="Please enter a User ID" /></td>
</tr>
<td class="style3" width="200">Last Name</td>
<td><cfinput type="text" name="lname" required="yes" message="Please enter a User ID" /></td>
</tr>
<tr>
<td class="style3">Password</td>
<td><cfinput type="text" name="password" required="yes" message="Please enter a Password" /></td>
</tr>
<tr>
<td class="style3">Confirm Password</td>
<td><cfinput type="text" name="password_confirm" required="yes" message="Please confirm your Password" /></td>
</tr>
<tr>
<td class="style3">Email Address </td>
<td><cfinput type="text" name="email" required="yes" message="Please enter your Emial Address" /></td>
</tr>
<tr>
<td colspan="2" align="center"><div class="style3">Click to Register</div><cfinput type="image" name="register_button" src="images/arrow.gif" /></td>
</tr>
</table>
<cfinput type="hidden" name="date" value="<cfoutput>#NOW()#</cfoutput>" />
</cfform>
<cfelse>
<cflocation url="registerComplete.cfm">
</cfif>
Take care,
Walyer
Walyer's Playpen
<cfparam name="FORM.name_first" default="" />
<cfparam name="FORM.name_last" default="" />
<cfparam name="FORM.email" default="" />
<cfset bRegistrationSuccess = false />
<cfif IsDefined('FORM.register_button.y') AND FORM.password NEQ FORM.password_confirm> do the pws match?
<cflocation url="password_confirm.cfm" />
<cfelseif IsDefined('FORM.register_button.y')>
<cfquery name="qUserCheck" datasource="dsn">
SELECT *
FROM db_name
WHERE user_name = '#FORM.userid#'
</cfquery>
<cfif qUserCheck.RecordCount NEQ 0> is the user name already taken?
<cflocation url="userid_confirm.cfm" />
<cfelse>
<cfquery datasource="dsn">
INSERT INTO table_name(user_name, user_first, user_last, join_date, password, email)
VALUES('#FORM.userid#', '#FORM.fname#', '#FORM.lname#', '#FORM.date#', '#FORM.password#', '#FORM.email#')
</cfquery>
<cfset bRegistrationSuccess = true />
</cfif>
</cfif>
this is the form you would use for your user registration
<cfif NOT bRegistrationSuccess>
<cfform action="#CGI.SCRIPT_NAME#" name="register" method="POST">
<table width="500" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td colspan="2" class="style3"><div align="center">Registration Form </div></td>
</tr>
<tr>
<td class="style3" width="200">User ID </td>
<td><cfinput type="text" name="userid" required="yes" message="Please enter a User ID" /></td>
</tr>
<td class="style3" width="200">First Name </td>
<td><cfinput type="text" name="fname" required="yes" message="Please enter a User ID" /></td>
</tr>
<td class="style3" width="200">Last Name</td>
<td><cfinput type="text" name="lname" required="yes" message="Please enter a User ID" /></td>
</tr>
<tr>
<td class="style3">Password</td>
<td><cfinput type="text" name="password" required="yes" message="Please enter a Password" /></td>
</tr>
<tr>
<td class="style3">Confirm Password</td>
<td><cfinput type="text" name="password_confirm" required="yes" message="Please confirm your Password" /></td>
</tr>
<tr>
<td class="style3">Email Address </td>
<td><cfinput type="text" name="email" required="yes" message="Please enter your Emial Address" /></td>
</tr>
<tr>
<td colspan="2" align="center"><div class="style3">Click to Register</div><cfinput type="image" name="register_button" src="images/arrow.gif" /></td>
</tr>
</table>
<cfinput type="hidden" name="date" value="<cfoutput>#NOW()#</cfoutput>" />
</cfform>
<cfelse>
<cflocation url="registerComplete.cfm">
</cfif>
Take care,
Walyer
Walyer's Playpen
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ColdFusion Marketplace
Similar Threads
- Forgot XP password (Windows NT / 2000 / XP / 2003)
- Admin Account reset pw and login (Windows NT / 2000 / XP / 2003)
- Password Protecting the add page (PHP)
- internet form handling (Python)
- Forgot Password Cant Get Into Computer (Windows NT / 2000 / XP / 2003)
Other Threads in the ColdFusion Forum
- Previous Thread: HELP: CF 4.5 Session Timeout issue
- Next Thread: never learned by e.g. - its horrible form - help?


Linear Mode