Try doing a CFDUMP of the Session scope - then you can see what is, and
what isn't, being set

-----Original Message-----
From: Bushy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 8:24 AM
To: CF-Talk
Subject: RE: application.cfm

I'm using the correct application.cfm. I did what you suggested. I don't
know why the SESSION variables are not being set with the <cfset.
They just won't output anything in my index.cfm file.

--Original Message Text---
From: Pascal Peters
Date: Tue, 7 Oct 2003 14:19:41 +0200

It should work. Are you sure you are executing the right
application.cfm. Try putting some text in there to verify. You should
see the text.

application.cfm
------------------
<h3>Setting session</h3>
<cfif NOT IsDefined("SESSION.init")> ...

-----Original Message-----
From: Bushy [mailto:[EMAIL PROTECTED]
Sent: dinsdag 7 oktober 2003 14:11
To: CF-Talk
Subject: RE: application.cfm

If I put the query and <cfset SESSION variables into my index.cfm file I
can output the results no problem. It won't work if its in my
application.cfm?

Whats wrong?

--Original Message Text---
From: Bushy
Date: Tue, 07 Oct 2003 07:53:15 -0400

Why is this not working?

I have the following code in my application.cfm

application.cfm
------------------

<cfif NOT IsDefined("SESSION.init")>
<cfquery name="listenv" datasource="database">
select *
from table1
where struser = test
</cfquery>

<cfset SESSION.field1 = #listenv.field1#>
<cfset SESSION.field2 = #listenv.field2#>
<cfset SESSION.field3 = #listenv.field3#>
<cfset SESSION.field4 = #listenv.field4#>

<cfset SESSION.init = true>
</cfif>

Then in my index.cfm file I'm just outputting the above SESSION
variables for testing yet gets displayed except the SESSION.init
variable. Why?
What's wrong with my syntax?

index.cfm
------------

<cfoutput>
SESSION.init: #SESSION.init#<br>

SESSION.field1: #SESSION.field1#<br>
SESSION.field2: #SESSION.field2#<br>
SESSION.field3: #SESSION.field3#<br>
SESSION.field4: #SESSION.field4#<br>
</cfoutput>

  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to