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]
- RE: application.cfm Bushy
- RE: application.cfm Tony Weeg
- RE: application.cfm Matt Robertson
- RE: application.cfm Gyrus
- SQL Puzzle? cf-talk
- RE: SQL Puzzle? Tony Weeg
- RE: application.cfm Bushy
- RE: application.cfm Won Lee
- RE: application.cfm Philip Arnold
- RE: application.cfm Bushy
- RE: application.cfm Pascal Peters
- RE: application.cfm Bushy
- RE: application.cfm Philip Arnold
- RE: application.cfm Bushy
- RE: application.cfm Mike Kear
- RE: application.cfm Scott Wilhelm
- RE: application.cfm McGill, Eric
- RE: application.cfm Bushy
- RE: application.cfm Bushy
- RE: application.cfm Won Lee
- RE: application.cfm Bushy