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: pgp51u0CQsumW.pgp
Description: PGP signature

Reply via email to