RE: [PHP] Passing associative arrays between forms
| From: | T.R. Henigson | Date: | Fri, 18 Aug 2000 21:38:13 +0000 |
| Subject: | RE: [PHP] Passing associative arrays between forms | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12539@lists.php.net to get a copy of this message | ||
As I understand it from the online docs, you have to urlencode() after
serializing and urldecode() before unserializing.
Ted
> -----Original Message-----
> From: Lars Torben Wilson [mailto:torben@php.net]
> Sent: Thursday, August 17, 2000 2:24 PM
> To: Paulson, Joseph V. "Jay"
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Passing associative arrays between forms
>
>
> "Paulson, Joseph V. \"Jay\"" writes:
> > Hey everyone--
> >
> > I have a multiple page form (it's three pages long) and I am
> trying to pass
> > an array between each form using the implode() and explode() functions.
> > However, I would like to keep the associative properties of the array I
> > create and not have to keep track of what position [0],
> [1],...[99] are. Is
> > there any other way to pass array's between forms besides using the
> > implode() and explode() functions?
> >
> > I've already tried cookies but I have too many values for the browser to
> > handle (I have over 20 variables to pass between each form). Therefore,
> > cookies won't work.
> >
> > Any how, any help would be much appreciated!!! :)
> >
> > Thanks in advance...
> > Jay Paulson
>
> If you're willing to use cookies anyway, probably the easiest way
> would be to look into session management: i.e. using PHP4's builtin
> session handling functions (in the manual), or (if you're still on
> PHP3) check out a package like PHPLIB (http://phplib.netuse.de).
>
> Alternatively, you could serialize() the data, encode it into an URL
> (or POST it), then unserialize() it on the next page. Check out the
> following pages:
>
http://www.php.net/manual/function.serialize.php
http://www.php.net/manual/function.unserialize.php
Cheers,
Torben
--
+----------------------------------------------------------------+
|Torben Wilson <torben@php.net> Netmill iTech|
|http://www.coastnet.com/~torben http://www.netmill.fi|
|Ph: 1 250 383-9735 torben@netmill.fi|
+----------------------------------------------------------------+
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net