Hi Jon et al,

Thanks for the response.

1.  I decided to redo the login form and the application tag, and now I'm
getting this error message after entering my username and userpassword:

"Form Entries Incomplete or Invalid
One or more problems exist with the data you have entered.
This field must be filled before submission of form.

Use the Back button on your web browser to return to the previous page and
correct the listed problems."

But both username and userpassword fields *have* been filled in.  Why is one
or both not being recognized?

2.  If I type in my user name, and leave the password field blank, nothing
happens when I press the login button when, according to the cfinput
required code, I should get an error message warning me that I need to fill
in the password.

3.  If I type in my password alone, I get the expected message generated by
a hidden input type value argument.

When remaking the login form, I dragged and dropped the names of the fields
from the database into studio's edit page using the database tab, to ensure
that I got all the names right.  Below is A. the code for the login form,
and B. the code for the application.cfm tag.  I'd appreciate any advice as
I'm totally stumped at this point.

A. clicologin.cfm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<CFIF ISDEFINED('FORM.USERNAME')>
<!---If the login form was filled out, run the code immediately
  below. If the from hasn't been filled out yet, jump to the
     next CFELSE and display the form.--->

  <!---This query looks for the UserName and Password that was
       entered in the login form.  If it does not find a match
       the 'RecordCount' will be 0 and you will know that the user
       should not be given access.--->
  <CFQUERY NAME='CHECK' DATASOURCE="#DB#">
    SELECT * FROM User
    WHERE UserName = '#Form.UserName#'
 AND UserPassword = '#Form.UserPassword#'
  </CFQUERY>

    <!---Check whether a UserName/Password was found--->
    <CFIF #CHECK.RECORDCOUNT# IS 0>

      <!--- we have an invalid request because there were
            no matching UserName/Password in the DataBase--->
      Sorry, invalid username or password. Please click
      <A HREF="clicologin.cfm">here</A> to try again.


    <CFELSE>
    <!--- we have at least one match so we give them two
          variables.  Auth and Admin that we can use later
          to determine whether they are allowed to view pages
          or not.  A secure page needs to verify that Auth is
          'Yes' and can then use Admin to display the UserName--->

      <!---Set there 'Authorization level' to 'Yes'--->
      <CFSET SESSION.AUTH ='YES'>

      <!---Store their UserName in the Admin variable if you
           want to display their name to them on a page later--->
      <CFSET SESSION.ADMIN =FORM.USERNAME>

      <!---The user is now logged in.  Send them to your application--->
      <CFLOCATION URL='CLICOFORM1.CFM'ADDTOKEN="No">

    </CFIF>



<!---Display the login form --->
<CFELSE>


<HTML>
<HEAD>
 <TITLE>PROPOSAL FOR INSURANCE OF MONEY LOGIN PAGE</TITLE>
</HEAD>

<BODY>

<H1>PROPOSAL FOR INSURANCE OF MONEY LOGIN PAGE</H1>
  Please log in below.

  <CFOUTPUT>
    <CFFORM METHOD='POST' ACTION='CLICOLOGIN.CFM'>
   <TABLE>
      <TR>
     <TD>
             User Name:
     </TD>
     <TD>
       <CFINPUT TYPE="Text"
              NAME="UserName"
              MESSAGE="Please fill in this field before submitting this
form"
              REQUIRED="Yes">
     </TD>
   </TR>
           <INPUT TYPE="hidden" NAME="Password_required"
            VALUE="This field must be filled before submission of form.">
         <TR>
     <TD>
       Password:
     </TD>
     <TD>
       <INPUT TYPE="Password"
              NAME="UserPassword">
        </TD>
       </TR>
        </TABLE>

  <P>

     <INPUT TYPE='SUBMIT' VALUE='LOG IN'>
    </CFFORM>
  </CFOUTPUT>

</CFIF>



</BODY>
</HTML>

----------------------------------------------------------------------------
------------------------------------------------

B. clicoapplication.cfm

<!---Name application--->

<CFAPPLICATION  NAME="clicologin"
   SESSIONMANAGEMENT="YES"
   SESSIONTIMEOUT=#CreateTimespan(0,0,30,0)#>

 <!---Set appliction constants--->

<CFSET DB="Clico">
<cfparam name="session.auth" default="NO">


Hubert
---
Hubert Earl

ICQ#: 16199853
AIM: hubertfme

My Jamaican Art, Craft & More Online Store:
http://www.angelfire.com/ny/hearl/link_page_on_angelfire.html


----- Original Message -----
From: "Jon Hall" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 2:59 AM
Subject: Re: Problem with login page


> So what is the name of the password field on your login page? Is it
> UserPassword?
>
> jon
> ----- Original Message -----
> From: "Hubert Earl" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, May 03, 2001 7:15 PM
> Subject: Problem with login page
>
>
> > hi. when i submit my login page i get this error message:
> >
> > "
> > Error Diagnostic Information
> >
> > An error occurred while evaluating the expression:
> >
> >
> > #Form.UserPassword#
> >
> >
> >
> > Error near line 8, column 15.
>
> --------------------------------------------------------------------------
> ------
> >
> > Error resolving parameter FORM.USERPASSWORD
> >
> >
> > The specified form field cannot be found. This problem is very likely
due
> to the fact that you have misspelled the form field name.
> >
> >
> >
> > The error occurred while processing an element with a general identifier
> of (#Form.UserPassword#), occupying document position (8:14) to (8:32)."
> >
> > This is the code I'm submitting, but darned if I could find anything
wrong
> with it:
> >
> >  <CFQUERY NAME='CHECK' DATASOURCE='Clico'>
> >     SELECT * FROM User
> >     WHERE UserName = '#Form.UserName#' AND
> >  Password = '#Form.UserPassword#'
> >   </CFQUERY>
> >
> > I've checked datasource name etc.  Could anyone suggest what I may be
> overlooking?  Thanks.
> >
> > ---
> > Hubert Earl
> >
> > ICQ#: 16199853
> > AIM: hubertfme
> >
> > My Jamaican Art, Craft & More Online Store:
> http://www.angelfire.com/ny/hearl/link_page_on_angelfire.html
> >
> >
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to