RE: [PHP-WIN] passing array with form

From: Date: Fri, 27 Jul 2001 22:42:46 +0000
Subject: RE: [PHP-WIN] passing array with form
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-8539@lists.php.net to get a copy of this message
I just did it: $Name = serialize($Name); $Name = ereg_replace("\"", "'", $Name); <form> <input type=hidden name=Name value=$Name> <submit> </form> After submitting: $Name = eregi_replace("'", "\"", $Name); $Name = stripslashes($Name); $Name = unserialize($Name); Ok, this works, but there is mush better way, I'm sure. Can somebody tell me? Afan Pasalic -----Original Message----- From: afan [mailto:afan@sprout.net] Sent: Friday, July 27, 2001 3:29 PM To: Php-Windows@Lists.Php.Net Subject: [PHP-WIN] passing array with form HI to all, I have a little, simple form and after submitting, together with that information I have to pass an array with other info. How? Let's say array is called $Name I tried this: $Name2 = addslashes(serialize($Name)); On screen: a:5:{i:0;s:13:\"Name 1\";i:1;s:6:\"Name 2\";i:2;s:10:\"Name 3\";i:3;s:11:\"Name 4\";i:4;s:12:\"Name 5\";} And after submitting: On screen: a:9:{i:0;s:13: - part after quotes is cutted off! After: $Name = unserialize(stripslashes($Name2)); no results! Any idea how to fix this? Thanks! Afan Pasalic -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net For additional commands, e-mail: php-windows-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.windows (#8539) next »