Well I got some of my problems solved.  Mostly it was a directory
structure problem.  My current problem is that I get logged in and then
when it goes to the membersonly directory it runs a cfm page there where
I have an application.cfm file with the following code.  The problem is
that the variable session.allowin does not seem to be set because it
blocks me when it checks that in the cfif statement.  The process page
says I successfully logged in and then when I call the members page the
application.cfm blocks me.  Any ideas?


<!--- Create the user login application --->
<cfapplication name="MyApp" clientmanagement="Yes"
                    sessionmanagement="Yes"
                    sessiontimeout="#CreateTimeSpan(0,0,15,0)#"
                    applicationtimeout="#CreateTimeSpan(0,2,0,0)#">

<!--- Now define that this user is logged out by default --->
<CFPARAM NAME="session.allowin" DEFAULT="false">

<!--- Now if the variable "session.allowin" does not equal true, send
user to the login page --->
<!---
        the other thing you must check for is if the page calling this
application.cfm is the "login.cfm" page 
        and the "Login_process.cfm" page since the Application.cfm is
always called, if this is not checked 
        the application will simply Loop over and over. To check that,
you do the following call 

--->
<cfif session.allowin neq "true">
      <cfif CGI.SCRIPT_NAME EQ "/login.cfm">
      <cfelseif CGI.SCRIPT_NAME EQ "/login_process.cfm">
      <cfelse>
      <!--- this user is not logged in, alert user and redirect to the
login.cfm page --->
      <script>
              alert("You must login to access this area!");
              self.location="/login.cfm";
      </script>
      </cfif>
</cfif>

-----Original Message-----
From: Mike Miessen [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 06, 2003 11:12 PM
To: CF-Talk
Subject: RE: login prob

Well that didn't change anything.  I got this from the easycfm.com
tutorial.

Hey I thought this was easy LOL

-----Original Message-----
From: John Wilker [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 06, 2003 10:44 PM
To: CF-Talk
Subject: RE: login prob

If you have a DSN already set up (I asusme you do and it's called users)
try using just 

<CFQUERY Datasource="users" name="qVerify">

John Wilker
Web Applications Consultant, Writer
Macromedia Certified ColdFusion Developer
Founder/President IE CFUG
www.red-omega.com
 
Whatever is wrong it is better than a poke in the eye with a sharp
stick. Unless of course you just got poked in the eye with a sharp
stick.


-----Original Message-----
From: Mike Miessen [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 06, 2003 7:37 PM
To: CF-Talk
Subject: RE: login prob


Well I took that out of my tag and it does not error but now it does not
seem to be checking the database table either because it is not passing
me through

I'm still trying to understand Peter's response LOL


-----Original Message-----
From: John Wilker [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 06, 2003 10:23 PM
To: CF-Talk
Subject: RE: login prob

Have you tried taking  dbname="#myDSN#" out of your tag? IIRC dbname
isn't used anymore, I could be wrong there. I never use it.

What CF version?

J.

John Wilker
Web Applications Consultant, Writer
Macromedia Certified ColdFusion Developer
Founder/President IE CFUG
www.red-omega.com
 
Whatever is wrong it is better than a poke in the eye with a sharp
stick. Unless of course you just got poked in the eye with a sharp
stick.


-----Original Message-----
From: Mike Miessen [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 06, 2003 7:13 PM
To: CF-Talk
Subject: login prob


I keep getting this error but I don't understand whats wrong with my
code can anybody tell me?
 
 

The tag does not have an attribute called dbname. The valid attribute(s)
are name, datasource, dbtype, sql, username, password, maxrows,
blockfactor, timeout, cachedafter, cachedwithin, debug. 

 
 

The Error Occurred in D:\wwwroot\MembersOnly\Login_Process.cfm: line 9

7 : <body>
8 : <!--- Get all records from the database that match this users
credentials ---> 9 : <cfquery name="qVerify" dbname="#myDSN#"
datasource="Users" username="#DSNUsername#" password="#DSNPassword#">
10 :     SELECT UserName, Password
11 :     FROM users
 







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to