Re: passing an array from a form

From: Date: Wed, 21 Jun 2000 22:34:34 +0000
Subject: Re: passing an array from a form
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2550@lists.php.net to get a copy of this message
This is what I do to pass arrays between forms... I use the serialize() function.. for example if I have an $array I serialize it like so: $serializedArray = serialize($array); Then I pass the var as a hidden form type... Once I get to the next form I unserialize the serialized array and all the data is like it was before it was serialized... $array = unserialize($serializedArray); If you are wondering how these functions work you can check out php.net and their quick ref. guide... hope this helps! Jay Paulson jay@dvdfuture.com http://www.dvdfuture.com ----- Original Message ----- From: Erb, Maria <merb@keene.edu> To: <php-general@lists.php.net> Sent: Wednesday, June 21, 2000 9:11 AM Subject: [PHP-GENERAL] passing an array from a form > hi all, > I'm trying to pass an array from a form field but without much success. > Here is my code: <input type="hidden" name="dates_array[]" > value="$dates_times[$i]"> and I put this through a "for" loop. When i > see > what is inside of "$dates_array" all I get is "A" which is not one of the > items in the array. What am I doing wrong? > > Thanks for the help,. > > Maria > > Maria B. Erb > Web Developer > Keene State College > 603-358-2340 > > mail address: > MS 2707 / CMIT > 229 Main Street > Keene, NH 03435 > > > -- > 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 > >

« previous php.general (#2550) next »