Just tried it out and you should use htmlspecialchars() instead of urlencode(). When you put it in a hidden field the browser is responsable for urlencoding the data.
Jacob On Mon, 2003-07-21 at 09:24, Andrei Verovski wrote: > Hi, > > I am need to pass serialized assotiative array via form hidden field > (not GET or POST). In order to do it, I did the following: > urlencode(serialize($my_array)). However, after retrieving data from > hidden field and unserialize I've got junk. > > Someone can explain me what I did wrong? > > Also, do I need to do addslashes/stripslashes with serialized (or > encoded ?) data? > > Thanks in advance for any suggestion. > > > ********************************************* > * Best Regards --- Andrei Verovski > * > * Personal Home Page > * http://snow.prohosting.com/guru4mac > * Mac, Linux, DTP, Development, IT WEB Site > ********************************************* > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Venlig hilsen / Best regards, Jacob Vennervald System Developer Proventum Solutions ApS Tuborg Boulevard 12 2900 Hellerup Denmark Phone: +45 36 94 41 66 Mobile: +45 61 68 58 51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php