RE: [PHP-DB] passing array through $PHP_SELF
| From: | Shrock, Court | Date: | Tue, 19 Mar 2002 03:30:04 +0000 |
| Subject: | RE: [PHP-DB] passing array through $PHP_SELF | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-17752@lists.php.net to get a copy of this message | ||
Why not write hidden inputs and name them appropriately so that when the
form gets submitted again, the array gets created automatically--no
implode/explode.
<input name="input[var1]" value="hello">
<input name="input[var2]" value="world">
then, upon submittal, the array, $_POST['input'], would look like this:
Array (
"var1" => "hello"
"var2" => "world"
)
Please let me know if this is unclear....
Court
-----Original Message-----
From: Mike de Libero
To: John Hughes, Jomari Works; php-db@lists.php.net
Sent: 3/18/02 7:22 PM
Subject: Re: [PHP-DB] passing array through $PHP_SELF
Sorry to say but the inelegant solution is the only way I have found how
to
do it :(. I read it on php FAQTs on how to pass arrays on multi-step
forms.
This is a very similar thing. So yes you have to implode the array then
pass it in a hidden field. Then explode the array after being passed to
form again. Hope this helps.
-Mike de Libero
mikede@soreye.com
http://www.soreye.com