Hi All,

My question is, I have a page (index.php) that creates an instance of a class (customers). In that page it opens a new page (edit.php or add.php, or del.php or search.php).
I need to know when that new page opens is the class "dead", and how can I pass the instance of the class to that page.

regards

paul

If index.php and add.php, edit.php... etc are different php pages then you have to manually create object instance for each page.

You can also do all these things like add, edit, delete, search in only one page. which can use one single instance.

Hi,

thanks for the responses.

I guess im still on the fence with this one.

vibhadevit - that is the way im doing it at present. There is more than 1 type (customer, seminar etc), and this is the way im doing it at the moment.

pritaeas - I knew you could do this in Java, but wasnt aware you could in PHP. Ill take a closer look at this. I believe you can just add sereliase at the end of the class name.

Just remember that when unserializing, the class definition needs to be loaded before the session starts (as mentioned in the thread).