Re: Passing associative arrays between forms

From: Date: Thu, 17 Aug 2000 21:24:27 +0000
Subject: Re: Passing associative arrays between forms
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12364@lists.php.net to get a copy of this message
"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| +----------------------------------------------------------------+

« previous php.general (#12364) next »