Re: Passing Serialized Array via Hidden field
| From: | Jacob Vennervald Madsen | Date: | Mon, 21 Jul 2003 08:20:22 +0000 |
| Subject: | Re: Passing Serialized Array via Hidden field | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156024@lists.php.net to get a copy of this message | ||
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