LoggedIn will NOT be defined if you try to login and fail. Notice your error msg branch doesn't set loggedIn to 0?
======================================================================= Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Jeff [mailto:[EMAIL PROTECTED] > Sent: Friday, March 21, 2003 10:01 AM > To: CF-Talk > Subject: Crud...I thought I had it down...[cflogin] > > > In my application.cfm file, I have the following: > <cfapplication clientmanagement="yes" sessionmanagement="yes" > name="myApp"> > > <!--- If you're not logged in, you step inside this code > block ---> <cflogin> > <!--- First, I'm checking to see if the login form > variables exist. Client validation makes sure they're filled > out on the form ---> > <cfif IsDefined("FORM.ClientLoginPassword") AND > IsDefined("FORM.ClientLoginUsername")> > <!--- If they exist, > then go ahead and pass them in > and and perform the login ---> > <cfquery name="qLogin" datasource="MyDSN"> > SELECT * > FROM ClientLogin > WHERE (Username = '#FORM.ClientLoginUsername#') AND > (Password = > '#FORM.ClientLoginPassword#') > </cfquery> > > <cfif qLogin.RecordCount EQ 1> > <cfloginuser name="#qLogin.FirstName#" > password="#qLogin.Password#" roles="#qLogin.Role#"> > <cfset LoggedIn = 1> > <cfelse> > I'm sorry, the username and/or password you > entered were incorrect, please try again. > </cfif> > <cfelse> > <!--- No form variable was found > so set the logged in variable to 0 and continue on---> > <cfset LoggedIn = 0> > </cfif> > </cflogin> > > Then, on the login process page, I check for > "Variables.LoggedIn" and I get an error every time that it's > not defined. But I'd THINK it'd be defined by that logic, > which is included in the application.cfm file...*sigh*... > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

