0

Hi

Im new to OO PHP, been reading through my book and in one example they are using a class structure in a shopping cart. I have used session variables in the past for shopping carts, can I assume that if I create a class, which has a cart_contents array variable to which I add products, that the data will be accessible from page to page (like a session variable is accessible on all pages)...?

thanks
lworks

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by lifeworks
0

ok, so i kept reading and discovered that they are using the serialize() to convert that object into a value which is then stored in the $_SESSION variable... they do a check at the start of every page and if its already set, unserialize() the session cart...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.