Re: Can't end session with logout button
- From: yf110@xxxxxxxxxxxxxxxxxxx (Malcolm Dew-Jones)
- Date: 11 May 2005 09:19:11 -0800
Jeff (jeffster86@xxxxxxxxxxx) wrote:
: Thanks, adding the line "<meta http-equiv="pragma" content="no-cache"
: />" worked.
: Micha, I already had the code below at the top of each page, but for
: some reason it wouldn't do the redirect after hitting the "Back"
: button. I'm still not sure why. Just because the page is being read
: from the cache shouldn't mean it should ignore the PHP code at the
: beginning of the page,
But if the page is in the cache then your script is not being called to
display the page. The browser is displaying a previously saved copy of the
html generated by your php script.
: which should have redirected the user to an
: "error" page. I've seen numerous PHP driven web sites that have "log
: off" buttons, and they don't allow the user go see their last page by
: hitting "back" after they've logged off. I wonder if all of these sites
: are using the "no cache" meta tag or some other mechanism? Thanks for
: answering my posts guys.
It should be easy enough to examine their html to find out.
: <?php
: session_start();
: If (!$_SESSION['auth'] == 1)
: {
: header('location:Error.php');
: }
: ?>
--
This space not for rent.
.
- Follow-Ups:
- Re: Can't end session with logout button
- From: Jeff
- Re: Can't end session with logout button
- References:
- Can't end session with logout button
- From: Jeff
- Re: Can't end session with logout button
- From: Jeff
- Can't end session with logout button
- Prev by Date: Temp downgrading of PHP version.
- Next by Date: Re: please explain or refer: $string = isset($xyz) ? $xyz : "something else";
- Previous by thread: Re: Can't end session with logout button
- Next by thread: Re: Can't end session with logout button
- Index(es):
Relevant Pages
|