Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)
- From: wouter@xxxxxxxxxxxxxxxxxx ("Wouter van Vliet / Interpotential")
- Date: Sun, 19 Aug 2007 22:40:57 +0200
What you're proposing, is to actually display some content on another page
then were the content is originally intended? I'm sorry, but I would
consider that 'bad practice'. To me, it makes perfect sense that you don't
want to leave the user on the page where login was originally handled. For
various reasons. One very obvious would be the 'refresh thing', where your
browser asks the user if they want to send the form again. Quite annoying.
Then, what about bookmarks? ...
I would definately go for the Location: header solution!
On 19/08/07, tedd <tedd@xxxxxxxxxxxx> wrote:
At 8:52 AM +0200 8/19/07, Otto Wyss wrote:
In my case I could easilly do without redirection but just exit and
fall back on the calling page. Yet I want to remove the login page
from the browser history. Does the header function have the same
effect?
O. Wyss:
Instead of messing with the user's browser (not good IMO), why not
use $_SESSION and make it such that if the user selects the log-on
page again, they are redirected to another page? You don't even need
header() to do that.
Here's an example:
http://webbytedd.com/bb/one-time
You will only see that page only once -- unless you find a way to
clear the session.
The process is simply to set a session variable and allow the user to
see the page once. Upon returning, the session variable is checked
and if it is "not null", then the user is redirected to another page
like so:
if($visit != null)
{
ob_clean();
include('a.php');
exit(0);
}
Very simple.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Interpotential.com
Phone: +31615397471
- Follow-Ups:
- References:
- Cookies and sent headers
- From: Otto Wyss
- RE: [PHP] Cookies and sent headers
- From: "Sanjeev N"
- Re: [PHP] Cookies and sent headers
- From: "M. Sokolewicz"
- Redirection with header (was Re: [PHP] Cookies and sent headers)
- From: Otto Wyss
- Cookies and sent headers
- Prev by Date: Re: Render fonts
- Next by Date: Re: [PHP] iterating and changing value of an array using foreach and references - PHP 5.2.3
- Previous by thread: Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)
- Next by thread: Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)
- Index(es):
Relevant Pages
|