[nycphp-talk] preventing randomized session variable from changing when page is refreshed
Michael B Allen
ioplex at gmail.com
Wed Aug 20 15:43:41 EDT 2008
On Wed, Aug 20, 2008 at 3:24 PM, Kristina Anderson
<ka at kacomputerconsulting.com> wrote:
> Hi all --
>
> When visitors initially arrive on the site, a randomized session id is
> generated to track items they add to their cart. The only problem is
> that when/if they return to/refresh the homepage during their visit,
> the session id changes and this will obviously result in unwanted
> issues.
>
> How can I prevent this from happening? Is index.php the proper place
> to instantiate the session id?
Use session_id() as the key for your cart. That should not change for
the duration of their visit.
Mike
--
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/
More information about the talk
mailing list