You are here: Re: Can't end session with logout button « PHP Programming Language « IT news, forums, messages
Re: Can't end session with logout button

Posted by Malcolm Dew-Jones on 05/11/05 20:19

Jeff (jeffster86@hotmail.com) 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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация