troubleshooting Question

Element USER_ID is undefined in SESSION.

Avatar of Panos
PanosFlag for Germany asked on
Web Development SoftwareWeb ServersColdFusion Language
6 Comments2 Solutions1509 ViewsLast Modified:
Hello experts.
When i logout i have this error:
Element USER_ID is undefined in SESSION.
Any help?
The page is like this
<cfparam name="SESSION.User_id" default="-1">
<cfif "" EQ "" >
  <!--- WA_ClearSession --->
	<cfset clearAll = True >
	<cfset clearThese = ListToArray("", ",") >
	<cfif clearAll>
		 <cflock scope="Session" type="Exclusive" timeout="60" >
			  <cfset StructClear(Session)>
		 </cflock>
	<cfelse>
		<cfloop from="1" to="#ArrayLen(clearThese)#" index="i" >
			<cfset StructDelete(Session, clearThese[i]) >
		</cfloop>
	</cfif>
</cfif>
<cfquery name="q_MyItem" datasource="#dsn#">
SELECT Test_ID, User_ID
FROM dbo.artikel
WHERE User_ID = <cfqueryparam value="#SESSION.User_ID#" cfsqltype="cf_sql_numeric"> 
   AND Test_ID = 1
</cfquery>
 
<cfoutput>#q_MyItem.Recordcount#</cfoutput>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros