sessions and classes
Posted: Mon Nov 22, 2004 6:59 am
can i save a class into a session and read it back on another page?
thnaks in advance
peleg
thnaks in advance
peleg
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
session_start();
include('class.ShoppingCart.php');
$ShoppingCart =& $_SESSION['ShoppingCart'];
if (!is_object($ShoppingCart)) {
$ShoppingCart = new ShoppingCart();
}Code: Select all
session_start();
include('class.ShoppingCart.php');
$ShoppingCart =& $_SESSION['ShoppingCart'];
if (!is_object($ShoppingCart)) {
$ShoppingCart =& new ShoppingCart();
}