Hi,
I'm currently working on a new system and have built a number of objects for controlling data access user properties etc. I want to pass the object between pages.
The site works in the following way:
Login.php - accesscheck.php - valid credentials? - N - login.php
Login.php - accesscheck.php - valid credentials? - Y - mainpage.php
Mainpage.php will be the only page for the display of data as using AJAX I will alter this page.
When the credentials are passed to accesscheck the dataobect and userobject are instantiated and I would like to pass these on to mainpage.php.
I have read that serialization is the way to do this but I have also read a few things about this that worry me a bit.
For instance I have read that you should not serialize an object if it references itself. My objects do that using $this->propertyname .
Also the user object has an instance of the dataobject on it. So perhaps I only need to pass one of them over I don't know.
I have read a lot about this and ended up confused. So I thought I would ask for some friendly advice.
Thanks in advacne
nathj
I'm currently working on a new system and have built a number of objects for controlling data access user properties etc. I want to pass the object between pages.
The site works in the following way:
Login.php - accesscheck.php - valid credentials? - N - login.php
Login.php - accesscheck.php - valid credentials? - Y - mainpage.php
Mainpage.php will be the only page for the display of data as using AJAX I will alter this page.
When the credentials are passed to accesscheck the dataobect and userobject are instantiated and I would like to pass these on to mainpage.php.
I have read that serialization is the way to do this but I have also read a few things about this that worry me a bit.
For instance I have read that you should not serialize an object if it references itself. My objects do that using $this->propertyname .
Also the user object has an instance of the dataobject on it. So perhaps I only need to pass one of them over I don't know.
I have read a lot about this and ended up confused. So I thought I would ask for some friendly advice.
Thanks in advacne
nathj
Comment