Re: Sessions w/o cookies and the "Back" button
| From: | Christopher Allen | Date: | Tue, 10 Oct 2000 16:51:11 +0000 |
| Subject: | Re: Sessions w/o cookies and the "Back" button | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-19389@lists.php.net to get a copy of this message | ||
"Boget, Chris" wrote:
>
> > Why not use your index page to start the session and register
> > any variables needed then, and then use a header("Location ...
> > to send them to a new page where they actually see stuff?
>
> This is the suggestion that Andreas made. And that is all well
> and good. But if, for whatever god knows reason, a user click
> the back button all the way to that page (like if they were trying
> to get back and click it one too many times), then it will hit the
> page that starts the session, registers the variable, etc., etc. yadda
> yadda and all their previous session information is _lost_. Gone.
> This page will start a brand new session, redirect them back to
> the index page and the user will have to start all over.
>
What I do is tag a flag onto the users url while they are going around
my site that says they have an id.
That way no matter if they land on the index/ or session start page they
wont register again...
I have tested it continually and have found no surprising situations
that I couldn't code a solution.
I too needed a solution that did not invlove cookies and this worked
well. I can provide more details if needed....
while ($flag != 1 ) {
// Won't enter this block again unless the user leaves the site
set_up_session_id
$flag=1
}
....
Good Luck