Will Spence of Dautolink dismantled the actual working program, so until I get ColdFusion and database -- here it goes...
I had remembered reading and working with other
programs that worked with clues, so I thought that might be a good idea
to implement this in the program.
The first part to look at is the link underneath
the Login and Password section on the right - the New Users Signup...you
can
post all the variables you have seen in the database we have just
constructed. Of course, there is a simple html form that we
start with...
You have your choice of Clue questions, and
actually when you go back and try and find your username and password that
you have forgotten, you have unlimited chances of picking the right clue (but
not the clue answer -- that is specific.) The password
boxes are the usual enter and re-enter modes, the first password entry is text,
the second in password mode. (The second password
is Password2 in the Access database).
Submit. You not only see your posting, but
receive an email at the email address you have entered. Here is the code
that
does the work in resulting page, passwdb.cfm.
<html>
<head>
<title>
Password/Registration Request</title>
</head>
<CFIF Len(Trim('#Form.UserName#')) IS 0>
<cfoutput><font color="red"><b><br>Your UserName does not have an actual entry. Please backspace and re-enter.</font></b><br><br></cfoutput>
<cfabort>
</CFIF>
<CFIF Len(Trim('#Form.Password#')) IS 0>
<cfoutput><br><font color="red"><b><br>Your Password does not have an actual entry. Please backspace and re-enter.</font></b></br><br></cfoutput>
<cfabort>
</CFIF>
<CFIF '#Form.Password#' IS NOT '#Form.Password2#'>
<cfoutput><br><font color="red"><b>Your passwords and its retyped alias are not equal each other. Please backspace and redo both re-entries again.</font></b><br><br></cfoutput>
<cfabort>
</CFIF>
<CFINSERT DATASOURCE="upload" TABLENAME="passwd">
<body bgcolor="#FFFFFF">
<a href="index2.cfm"><FONT SIZE="5">BACK TO HOME PAGE</A></FONT><BR><BR>
<CENTER>
<H2>REGISTRATION RESULTS PAGE</H2><BR><BR>
</CENTER>
<b><font size=5>This is your Registration/Password Information.<br>
Keep it in a safe place. An email will be coming to your address shortly.<br></b></font>
<br><br>
<CFOUTPUT>
<center>
<table border="0" cellpadding="0" cellspacing="0" width="90%">
<tr>
<td width="45%"><b>YOUR NAME:</b></td>
<td width="45%">#LastName# #FirstName#
<p></td>
</tr>
<tr>
<td width="45%"><b>YOUR EMAIL:</b></td>
<td width="45%">#email#
<p></td>
</tr>
<tr>
<td width="45%"><b>CLUE QUESTION:</b></td>
<td width="45%">#Clue#
<p></td>
</tr>
<tr>
<td width="45%"><b>CLUE ANSWER:</b></td>
<td width="45%">#Clue2#
<p></td>
</tr>
<tr>
<td width="45%"><b>USER NAME:</b></td>
<td width="45%">#UserName#
<p></td>
</tr>
<tr>
<td width="45%"><b>PASSWORD:</b></td>
<td width="45%">#Password#
<p></td>
</tr>
</table>
</center>
</div>
</CFOUTPUT>
<hr><br><br>
If you wish to unsubcribe, please access <a href="info@dautolink.com">info@dautolink.com</a><br> and type
unsubscribe and your last name in the subject line, and send.
</b></font>
<CFMAIL TO= #Form.email#
CC="info@dautolink.com"
FROM= "info@dautolink.com"
SUBJECT= "Valid Registration and Password"
SERVER="mail.dautolink.com">
This is your valid username and password.
Thank you for choosing Dautolink.com. We will be in touch with you soon!
Your Name: #Form.LastName# #Form.FirstName#
Your Email: #Form.email#
Clue Question: #Form.Clue#
Answer to Clue: #Form.Clue2#
User Name: #Form.UserName#
Password: #Form.Password#
If you wish to unsubcribe, please access info@dautolink.com and type
unsubscribe and your name in the subject line, and send.
</CFMAIL>
</body>
</html>
What if you forget the password? Time to
parse that database that you have just posted to...You will not be posted out for entering too many
names, but the clue and email and clue answer must all jive, or no password
and
username. Unlike many other password programs, you get the correct combo,
and your UserName and Password are posted
as well as emailed. Saves some time. Here's the posted cfm page for
forgot1.cfm, forgot2.cfm...
<CFQUERY NAME="gilwayb" DATASOURCE="upload">
SELECT *
FROM passwd
WHERE CLUE2='#FORM.Clue2#' AND EMAIL='#FORM.email#'
</CFQUERY>
<html>
<head>
<title>
Password/Registration Request Approved</title>
</head>
<BODY bgcolor="#FFFFFF">
<a href="index2.cfm"><FONT SIZE="4">BACK TO LOGIN PAGE</A></FONT><BR><BR>
<CFMAIL TO= #Form.email#
CC="info@dautolink.com"
FROM= "info@dautolink.com"
SUBJECT= "Valid Registration and Password"
SERVER="mail.dautolink.com"
QUERY="gilwayb">
This is your valid username and password.
Thank you for choosing Dautolink.com. We will be in touch with you soon!
<CFOUTPUT>
Your Name: #LastName# #FirstName#
User Name: #UserName#
Password: #Password#
</CFOUTPUT>
</CFMAIL>
<b><font size=4>This is your Registration/Password Information.<br>
Keep it in a safe place.<BR>An email will be coming to your address shortly.<br>
If your clue and email are not yours, your name will not be posted on this page.<br>
Please contact Dautolink directly, or Re-Register.<br>
</b></font>
<br><hr>
<CFOUTPUT QUERY="gilwayb">
<b><font size=4>
Name: #LastName# #FirstName#<BR>
User Name: #UserName#<BR>
Password: #Password#<BR></B></FONT>
</CFOUTPUT>
<BR>
<a href="index2.cfm"><FONT SIZE="4">BACK TO LOGIN PAGE</A></FONT>
</body>
</html>