Re: Sending Multi.Multi Diamentional Arrays
| From: | php3 at developersdesk dot com | Date: | Sat, 02 Sep 2000 05:09:13 +0000 |
| Subject: | Re: Sending Multi.Multi Diamentional Arrays | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-14902@lists.php.net to get a copy of this message | ||
Addressed to: Matt McClanahan <cardinal@dodds.net>
php-general@lists.php.net
** Reply to note from Matt McClanahan <cardinal@dodds.net> Fri, 1 Sep 2000 15:42:48 -0500
(CDT)
>
> On Fri, 1 Sep 2000, John Coggeshall wrote:
> urlencode(serialize($array)), send across however you like (Get, Post)
> On the other end, unserialize(urldecode($array))
>
> Or it may be possible to register it as a session variable and not
> worry about serializing. I've never bothered to try it.
>
I would not force someone into a session just to pass a bit of data
between two pages, there is quite a bit of overhead. OTOH, if there is
any other reason to use sessions adding another variable to the list of
registered variables, even a complex multi-dimensional array is easy.
Security might be a reason to use sessions. If you look at that
serialized data it is trivial to modify. If you store the data in the
browser a hacker can modify it. It all depends on the data and what you
are doing with it.
Rick Widmer
Internet Marketing Specialists
www.developersdesk.com