Solved

Please help me figure out a logout technique

Posted on 2004-08-12
2
153 Views
Last Modified: 2013-12-24
Hello,

I have a link in my navigation that says "Logout".  This navigation bar is included in my Application.cfm.

I want to the user to click the LOGOUT link in my navigation bar in order to get out of my application.

Please I am requesting if can someone give me a code and please mention where i have to put it, Application.cfm or other pages.  Im just in a tight schedule again.

Thanks for understanding.  By the way, i use the basic session method in Ben forta's book.  So, those CFlogout is a bit different from what i am doing.

Thanks
0
Comment
Question by:mdbbound
2 Comments
 
LVL 11

Accepted Solution

by:
hart earned 400 total points
ID: 11791300
ok thats simple....

just an advice don't put a lot of code in your application file as this file gets executed everytime...
keep it as simple as possible...

ok when the link is clicked.. call a file say LogOut.cfm
and in this file write this code

<!--- in the place of somevariable put a session variables name that u have formes after login --->
<CFIF IsDefined("Session.SomeVariable")>
    <cfset StructDelete(session,"SomeVariable")>
</CFIF>

Delete all the session variables and then redierect him to the login page

Regards
Hart
0
 
LVL 35

Assisted Solution

by:mrichmon
mrichmon earned 100 total points
ID: 11794687
Or struct delete / struct clear and then on that same page have a message that says "You are logged out. Click here to relogin"

rahter than auto- redirecting to login page.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
What You Need to Know when Searching for a Webhost Provider
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question