Possible Duplicate:
PHP: Storing 'objects' inside the $_SESSION
I have 2 scripts files named 'search.php' and 'share.php' and I want to send information from the first to the second one. I created a var named $_SESSION['search'] wich is a object of the class Search, but I can't read the object in the second script file.
search.php
session_start();
$_SESSION['search'] = new Search($text);
(...)
share.php
session_start();
$itemList = $_SESSION['search']->getItemList(); // Error
Why? How can I pass info from one script to another in PHP?