Of course the seesion scope is undocumented, so you could try the session
scope instead :OD

-----Original Message-----
From: Adrian Lynch [mailto:[EMAIL PROTECTED]
Sent: 22 July 2003 12:23
To: '[EMAIL PROTECTED]'
Subject: RE: [ cf-dev ] Aghhh - Whats happening :-(


Could it be a problem with the relocation. Comment it out and see what gets
put into the seesion scope. Just a guess mind.

Ade

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 22 July 2003 12:00
To: [EMAIL PROTECTED]
Subject: [ cf-dev ] Aghhh - Whats happening :-(



Totally brain dead this morning and not used CF in a while so forgot
everything (Mandoforms development)

What I expect to happen the first time I run this code is that the user is
asked to login.
User logs in with wrong username & password
session.loggedin is set anyway
Query trys to run
Code crashes as connection can not be made to database (To be trapped later
....)

User enters correct username & password
User sees name & address

However no matter what you enter it just loops around asking the user to
login :-(
Debug shows that the session.loggedin isn't set ????

Can anyone tell me what the hell is going on here ?


Application.cfm
<cfapplication name="Schools_Performance"
      sessionmanagement="yes"
      sessiontimeout=#createtimespan(0,0,1,0)#>

data_test.cfm
<cfif isdefined("session.loggedin")>
      <CFQUERY NAME="alldata" DATASOURCE="SecureDSN" username="
#session.UserName#" password="#session.Password#">
            SELECT      *
            FROM        Test
            WHERE       0=0
      </CFQUERY>
      <cfoutput query="alldata">
            #Name#
            #Address#
      </cfoutput>
<cfelse>
      <cfoutput>
            Before you can access this data you need to <a href
="loggedin/password.cfm" target="_top">login</a>
      </cfoutput>
</cfif>

password.cfm
<cfform action="login_action.cfm" method="POST">

<cfinput    type="Password"
                  name="entered_user_name"
                  size="20"
                  maxlength="20"
                  message="oops! - Please enter a valid user name"
                  required="Yes">

<cfinput    type="Password"
                  name="entered_password"
                  size="20"
                  maxlength="20"
                  message="oops! - Please enter a valid password"
                  required="Yes">

      <input type="submit" value="Enter">
</cfform>

login_action.cfm
<cfset session.loggedin="1">
<cfset session.UserName = "#form.Entered_User_Name#">
<cfset session.Password = "#form.Entered_Password#">
<cflocation url="http://marge/performance/data_test.cfm";>



Regards - Paul (Having a very bad morning so far .......)




****************************************************************************
*********************
The information contained within this e-mail sent by Birmingham City Council
is confidential and is intended for the named recipient only. If you are not
the intended recipient please notify us by telephone immediately on +(44)
121 303 6666 (International) or return it to us by e-mail quoting the name
of the sender and the addressee.
****************************************************************************
*********************


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to