Hi,
I am trying to store multiple instances of an object within a local array and then register that array with the session so that i can access the array across requests.
This works fine, I can set the data no problem, but when I access the data across requests, i get the following error:
Warning: Cannot send session cache limiter - headers already sent (output started at C:\apache\htdocs\classtest\classname.php:107) in C:\apache\htdocs\classtest\test2.php on line 4
The code that I am using in the second page is below:
include('dblib.class.php'); //self explanatory
session_start(); //initalise the session
echo "Test is an ".$test."<br>"; //displays the type of the $test var held within the session
foreach($test as $testitem) //loop through test array
{
//display type of var (should be an object)
echo $testitem."<br>";
}
echo $test[0]->str_Message; //display variable from class object
As i said, all the above works perfectly with the exception of the error that I am expriencing above. Its more of an annoyance than anything.
Does anyone have any ideas???
Thanks in advance.
Leon.