How do I pass an object from PHP Page to PHP Page?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Jeff Lynn
Forum Newbie
Posts: 2
Joined: Sun Nov 21, 2010 11:09 pm

How do I pass an object from PHP Page to PHP Page?

Post by Jeff Lynn »

Hi,

Can someone help me by showing me how to pass an object, such as a class, from a PHP web page to another PHP web page?

I had used $_POST $_GET and $_SESSION[xyz] for string values, but for an object?

Any idea?

Jeff
s992
Forum Contributor
Posts: 124
Joined: Wed Oct 27, 2010 3:06 pm

Re: How do I pass an object from PHP Page to PHP Page?

Post by s992 »

You could try to serialize it.
Jeff Lynn
Forum Newbie
Posts: 2
Joined: Sun Nov 21, 2010 11:09 pm

Re: How do I pass an object from PHP Page to PHP Page?

Post by Jeff Lynn »

I just used $_SESSION[xyz] to store and retrieve it and it works.

Just wonder if there is any other way other than serializing it?

Jeff
Post Reply