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>

You make just a plain posted to cfm page, and call it welcome.cfm, and have it do the same parsing work.  
I got fancy and wanted to protect all pages that say, were attempted to be directly accessed but no one had gone through the login page.  Don't worry about it, it still works without the fancy deterrence ColdFusion but not as well.  So for now, the posting page is login_action.cfm, which checks all things and decides if we should go to an error page or get into the site.  Then the welcome.cfm page...

For a test...post a username and password on the system, and then try it out on the login.cfm page, or take something from the
Access datatable I posted in the last page.

Here is the originating form and the result of the login page's form, the login_action.cfm. both posted one after another.

<FORM NAME="CFForm_1" ACTION="login_action.cfm" METHOD=POST onSubmit="return _CF_checkCFForm_1(this)">
<table border=0 bordercolor="000000" cellpadding=5 cellspacing=0>
<font face="Arial,Helvetica, sans-serif" color="FFFFFF" size="2"><b><font color="#FFFFFF">Get 
Free Email !<br><br>
Email login:<br><br><font face="Arial,Helvetica, sans-serif" color="FFFFFF" size="2"><br>
<font size="2"> 
<INPUT TYPE="text" NAME="username" TABINDEX=3 SIZE="22" MAXLENGTH="50"><br>
<input type="hidden" name="username_required" value="You must enter your User Name">
Password:<br>
<INPUT TYPE="password" NAME="password" TABINDEX=3 SIZE="22" MAXLENGTH="50"><br>
<input type="hidden" name="password_required" value="You must enter your Password">

</font> 
<center>
<input type="SUBMIT" value="Login" name="login">

</center><br>
<div align="center"><a href="passwda.cfm"><font color="#FFFFFF">New 
users Signup!</font></a></div>
</font>
<br>
<div align="center"><a href="forgot1.cfm"><font color="#FFFFFF">Did you forget your User Name or Password?</font></a></div>
</font></td>
</tr>
</table>
</FORM>



And now the login_action page:



<cfif NOT IsDefined ('form.username')>
<cflocation url="login.cfm" addtoken="No">
</cfif>

<cfquery name="gilwayb" datasource="upload">
SELECT *
FROM passwd
WHERE USERNAME = '#FORM.username#'
AND PASSWORD = '#FORM.password#'
</cfquery>

<CFSET Session.LoggedIn = "1">
<CFSET Session.FirstName = "#gilwayb.FirstName#">

<CFIF gilwayb.RecordCount IS 0>
<cflocation url="login.cfm" addtoken="No">
<CFSET StructClear(Session)>
<cfelse>
<CFSET Session.LoggedIn = "1">
<cflocation url="welcome.cfm" addtoken="No">


</cfif>

 



And now the welcome.cfm page which is the "it works!" direction of the login_action page...Another really nice thing, you get a Welcome FirstName! when you enter correctly!

<CFIF NOT IsDefined("Session.loggedIn")>
<CFSET StructClear(Session)>
<CFLOCATION URL="http://www.dautolink.com/login.cfm">
</CFIF>



<H1><CENTER>WELCOME <cfoutput>#session.FIRSTNAME#</cfoutput> !</H1></CENTER>



<!-- begin application.cfm -->



What's left - yes, that application.cfm page, the page that must be in every directory with your ColdFusion pages.  If you don't know how to operate one, and the program doesn't work still...email me at juliag@julia@computers.com, and we will be glad to work with it...
Basically,on the application.cfm page should have SESSIONMANAGEMENT="YES" AND CLIENTMANAGEMENT="YES"...



Whew!!, this whole thing is definitely not as easy as an ASP database driven password program, but well, you might as well try and use both items.