you probably need to set your var LoggedIn in the session scope.  This wil make the 
var available throught the session.  the variables scope exists in the cfm page only.

<cfset session.LoggedIn = 0>  

(mind your cflocks though)


Doug
>-----Original Message-----
>From: Jeff [mailto:[EMAIL PROTECTED]
>Sent: Friday, March 21, 2003 11: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
                                

Reply via email to