page 1
______
// include class definition file
include_once "order_classes.php";
// start session
session_start();
// create instance of class Order
$order = New Order();
// assign class instance to $SESSION[]
$_SESSION['order'] = $order;
page 2
______
// include class definition file
include_once "order_classes.php";
// start session
session_start();
// assign $_SESSION['order'] object to variable
$order = $_SESSION['order'];
I'm getting the following error when page 2 loads:
[error] PHP Notice: Undefined variable: _SESSION
Any ideas?
Are you passing the session id between the pages? E.g. are you setting session cookies, or passing the session id as part of the url?