I have been working on a XML rather than databse based system recently.
I didnt want to keep writing and parsing XML on each page for user preferences etc. The logical place then is to store them in a cookie.
As I am trying to be as object orientated as possible I want to store an object containing the data and the code to access them in a cookie.
The only really good reference to this I could find was on the zend site at
http://www.zend.com/manual/language.oop.serialization.php
I adapted the examples on this page to work with cookies by stripping out the file handling code and adding in.
session_register('a');
in the first page's code and taking out the file handling code in the second page and just leaving it with
session_start();
$a->show_one();
At the moment the cookie is set with the serialized data in it. However it is not accessed or possible unserialised on the second page as I get
fatal error call to a member funtion on a non object.
I am baffled here? Any Ideas?
MrRosary