0

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

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by pritaeas
0

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.

0

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.

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.