Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-26-2009, 04:49 PM   PM User | #1
tau9
New Coder

 
Join Date: Jan 2009
Posts: 48
Thanks: 28
Thanked 0 Times in 0 Posts
tau9 is an unknown quantity at this point
logout destroy session

Hi,

I am having some trouble ending/destroying a session I have tried using the following but I can still press that back button and I'm still logged in.

<?php
Session.Abandon()
?>

also unset, and destroy.

Any ideas how to destory the session so I can't press the back button and get back in.

Thanks in advance
tau9 is offline   Reply With Quote
Old 03-26-2009, 04:54 PM   PM User | #2
ohgod
Regular Coder

 
ohgod's Avatar
 
Join Date: Jun 2008
Location: Ohio
Posts: 579
Thanks: 6
Thanked 69 Times in 69 Posts
ohgod is on a distinguished road
i think you need session_start() before you call session_destroy() so it knows which one you want to kill
ohgod is offline   Reply With Quote
Users who have thanked ohgod for this post:
tau9 (03-30-2009)
Old 03-27-2009, 04:24 AM   PM User | #3
businessman2000
New to the CF scene

 
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
businessman2000 is an unknown quantity at this point
session_start() is what starts a session. There are ways around this but generally this will need to be at the top of each page. To destroy a session simply call session_destroy(). That will get rid of your session and eliminate all session variables as well.
businessman2000 is offline   Reply With Quote
Users who have thanked businessman2000 for this post:
tau9 (03-30-2009)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 10:08 AM.


Advertisement
Log in to turn off these ads.