Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > Other Languages

Reply
 
LinkBack Thread Tools
Old March 3rd, 2008, 01:45 AM   #1
New Member
 

Join Date: Dec 2007
Location: India
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 uday is on a distinguished road
session in not clear after logout

how to clear session when somebody logout. Problem is that when somebody logout and again type the previous url, it again opens the previous page without loign page. Here is my application.cfm file code and logout code. Please someone help me. Thanks in advance.

<cfapplication name="myApplication"
sessionmanagement="Yes"
sessiontimeout="#CreateTimeSpan(0,0,20,0)#"
applicationtimeout="#CreateTimeSpan(0,0,0,0)#"
setclientcookies="yes">
<cfsetting showdebugoutput="No">
<cfcookie name="CFID" expires="now">
<cfcookie name="CFTOKEN" expires="now">

<cfif IsDefined("Cookie.CFID") AND IsDefined("Cookie.CFTOKEN")>
<cfset cfid_local = Cookie.CFID>)
<cfset cftoken_local = Cookie.CFTOKEN>
<cfcookie name="CFID" value="#cfid_local#">
<cfcookie name="CFTOKEN" value="#cftoken_local#">
</cfif>
<cfparam name="select" default="login">
<cfif Not isdefined("session.TEST")>
<cfinclude template="login.cfm">
</cfif>
<cfparam name="hostname" default="http://#HTTP_HOST#/">
<cflock timeout="30" throwontimeout="No" type="EXCLUSIVE" scope="APPLICATION">
<cfset application.fullpath = "#hostname#">
</cflock>
<cfset thisPath=ExpandPath("../")>
<cfparam name="drive" default="#GetDirectoryFromPath(thisPath)#">

and here is the logout code

<cfif select is "logout">
<CFLOCK SCOPE="SESSION" TYPE="exclusive" TIMEOUT="10">
<cfset abc=StructDelete(session, "TEST",true)>
</CFLOCK>
<cfcookie name="CFID" expires="now">
<cfcookie name="CFTOKEN" expires="now">

<cflocation url="login.cfm">
</cfif>
uday is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] PHP Logout Message when redirect Aaron1988 PHP 44 November 20th, 2007 04:29 AM
help creating a login and logout page geyids PHP 14 March 26th, 2007 02:35 AM
Logout link and usability Webnauts WebForumz Suggestions 1 November 10th, 2005 05:14 AM
LOGOUT function Monie Classic ASP 16 August 18th, 2004 09:29 PM
any body can teach me how to do a LOGOUT button in my ASP pa Monie Classic ASP 1 July 26th, 2004 04:39 AM


Search Engine Optimization by vBSEO 3.2.0 RC8