I got a question about implementing a PHP class.
I'm really new to PHP and my background is in C++ coding. My question is, with PHP classes, once I move to another page, don't we lose all the variable values (unless we use a cookie or push them through the URL, etc.)
For example, let's say I have a shopping cart. Someone can add items to their cart on various pages. I don't want to declare a new instance of the shopping cart class each time because I want a cumulative total. So, how do I implement a class across many pages. I'm thinking I should use "include("myclass.inc")" on all relevant pages.
Is this correct?
Thanks,
M