On Wed, Aug 20, 2008 at 3:24 PM, Kristina Anderson
<[EMAIL PROTECTED]> wrote:

> 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.

You are trying to re-implement the concept of a session, poorly.  Just
use plain 'ol php sessions.  There is no reason to generate your own
session id.  Forcing users to a homepage to generate a session_id is a
really bad idea.  Run session_start() on all pages, and just store the
cart (or a key reference to the cart) in $_SESSION.

-John C.
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to