On Wed, Aug 20, 2008 at 5:38 PM, Kristina Anderson
<[EMAIL PROTECTED]> wrote:
> John -- store the cart items in the $_SESSION array and only write to
> the database when they check out?

Or store the cart in the database, and just store a key in the session
such as $_SESSION['cart_id']

> I am using PHP session but this variable is being passed in, as a
> unique identifier for that session/cart.

As a GET variable?  Why would you do this?  Cookies/sessions were
invented to making shopping carts work.

Your code to generate a session_id is pointless... ditch the
session_id code and just call session_start() on every page.  What do
you think is wrong with the default session_id generation?

-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