Re: passing objects in url

From: Date: Tue, 09 Jul 2002 18:14:10 +0000
Subject: Re: passing objects in url
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-106414@lists.php.net to get a copy of this message
Привет! Alexander Ross wrote:
If $this is an object, can I have the following link? <a href="process_this.php?this=$this">Process</a> Will the URL become too long? Will teh info get passed correctly? thanks
99% you are right, it will definitely be too long for a GET. Besides, before writing the process_this.php?this=$this thing your *$this* should be serialized. Watch the docs for it. Most probably you have access to some database, so you can just save your serialized version to a table (the type depends on the size of your serialized object) and just pass a pointer to the row for the process script to retrieve and unserialize the object back to normal life. Just one more thing: if your object contains any reference they will definitely become invalid, methinks. And I would never do object serializing if I expected performance to be there. But this really depends on the nature of your object, so handle the suggestion with care, it's just way too generic. пока Альберто Киев @-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@ LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......

« previous php.general (#106414) next »