RE: [PHP4BETA] New session id?
| From: | Jim Brain | Date: | Tue, 21 Sep 1999 18:16:48 +0000 |
| Subject: | RE: [PHP4BETA] New session id? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-4761@lists.php.net to get a copy of this message | ||
Or you could just keep the session, dump all the data in it, but leave a var
called "checkout" defined.
Jim
--
Jim Brain
Systems Architect, CSG.web Development
jim_brain@csgsystems.com
431-7754
-----Original Message-----
From: Sascha Schumann [mailto:sascha@schumann.cx]
Sent: Tuesday, September 21, 1999 12:12 PM
To: Richard Feather
Cc: php4beta@lists.php.net
Subject: Re: [PHP4BETA] New session id?
On Tue, Sep 21, 1999 at 10:20:41AM -0600, Richard Feather wrote:
> Is it possible to create a new session id under the same browser? Here's
> what I mean: I have a shopping cart built that uses the session id as the
> tracking number. After the person checks out, I put everything into the
> database and kill all session variables using session_destroy(). But I
> check to make sure that if the person inadvertantly hits the back button
and
> tries to resubmit the order, the system won't allow it (by session id).
>
> However, if the person wants to continue shopping (a possibility), I'd
like
> to give him the option to clear the session variable and continue.
>
> So I guess my question is there a way to reinitialize the session id?
Once you destroy a session, it is not known to the system
anymore. Hence it will be handled as a new session id, if the
user hits the back button. Your system should properly
initialize the data then (i.e. use a session variable to
check whether the current session is initialized).
--
Regards,
Sascha Schumann
Consultant
--
PHP 4 Beta