473,382 Members | 1,225 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

logout using session

3
I have been trying out the sessions in PHP. Am able to log into a my site and sessions for that particular logged on session. My problem is with the logout. Am unsetting and destorying the session on my way out but when I click on the back button on my browser, I am able to view my last visited page. how can i get around this?
Jun 7 '07 #1
3 1436
ronnil
134 Expert 100+
does your page have a protect function disabling to view it without the session variable set?
Jun 7 '07 #2
pbmods
5,821 Expert 4TB
Heya, pardhu. Welcome to TSDN!

You're likely seeing this behavior because your browser cached the page. When you click the back button, no request is actually getting sent to the server; the browser is serving up a copy from its cache of saved pages instead.

Try pressing the back button and then clicking on any of the links on that page. You should be redirected to your login page.

Check out this article for more info on browser caching and how to prevent it.
Jun 7 '07 #3
pardhu
3
does your page have a protect function disabling to view it without the session variable set?


I haven't use any oops concept.I have given session_start(); to every page,

and at the end in the logout page i started the session and also destroyed the

session.
Jun 7 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Jeff | last post by:
I've searched the web for hours trying to figure out this problem and can't seem to find any pertinent answers. I have a website where the user starts on a login page, puts in their credentials and...
4
by: ad | last post by:
I use the Login controls of Asp.net 2.0 in my program. I want to logout a user by program, I try Session.Abandon() for this. But I found that the user is the same after I execute Session.Abandon()....
4
by: Chumma Dede | last post by:
Hi, Is there any way in asp.net 1.1 to force a user to logout from an existing session on machine1, if that same userid logs in with a new session on another machine, say machine2? We are...
6
by: somaskarthic | last post by:
Hi This is somas here. I asked query about detecting the browser close event using javascript. I want to detect the event only when the X button in the top right corner is clicked and not else...
2
by: AAOMTim | last post by:
I want to automatically logout if certain conditions occur in my application. Calling Session.Abandon() does not force a logout. What can I do? -- Tim
25
by: crescent_au | last post by:
Hi all, I've written a login/logout code. It does what it's supposed to do but the problem is when I logout and press browser's back button (in Firefox), I get to the last login page. In IE,...
1
by: shrik | last post by:
hi everybody. I have following problem. There are two pages. index.jsp and main.jsp in my application Index.jsp contains logging interface in . It submits password and userid to loginform bean. ...
1
by: Kandiman | last post by:
Hiya, i made a asp page, and one of my divs (as a include) is as below. the problem is if the main page is resubmitted, i get logged out again?... heres the code.. i think its on the value=true...
6
by: Thiago Macedo | last post by:
I could not find on the web a complete solution for this task. This is not the perfect solution, because it's doesn't have the ability to log the logout if browser crash or user leave it open while...
2
by: phpmagesh | last post by:
Hi to all, I have created a page with login and logout. i used session to register the login user and when he clicks in logout, it will destroy the session. this is nice but if system is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.