Re: Passing objects between pages

From: Date: Sat, 26 Nov 2005 09:19:37 +0000
Subject: Re: Passing objects between pages
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-226463@lists.php.net to get a copy of this message
On Friday 25 November 2005 20:44, Matt Monaco wrote: > What is the best way to pass an object between pages? Currently I am > first > serializing, then doing a base64_encode, this doesn't seem entirely > efficient. (Especially the encode). > > I am however using the encode because I have the serialized object as the > value of a hidden form element. I can only have alphanumerics here. You can instead of using a hidden form element, use sessions. $_SESSION['obj_state']=serialize(objectinstance) On other pages you can check if obj_state is set, and use it to reinitialize your class (object). HTH Andy -- Now listening to Top! Radio Live www.topradio.be/stream on amaroK Geek code: www.vlaamse-kern.com/geek Registered Linux User No 379093 If life was for sale, what would be its price? www.vlaamse-kern.com/sas/ for free php utilities --

Attachment: [application/pgp-signature]
« previous php.general (#226463) next »