Re: Array as hidden input, again
| From: | Tim Paul | Date: | Thu, 28 Sep 2000 21:54:27 +0000 |
| Subject: | Re: Array as hidden input, again | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-3153@lists.php.net to get a copy of this message | ||
Mirko, try modifying this line:
echo "<form method=\"post\" method=\"prova1.php\">";
to:
echo "<form method=\"post\" action=\"prova1.php\">";
cheers, Tim
> From: "Mirko Nalesso"<okrim74@libero.it>
> Date: Thu, 28 Sep 2000 14:42:11 +0200
> To: php-db@lists.php.net
> Subject: Array as hidden input, again
>
> Hi,
> I have a problem with an array as hidden input in a form.
>
> The file are:
> -------------------------------------------
> -------------------------------------------
> File prova.php:
> -------------------------------------------
> <?
> $arr=array();
> $arr[1]=11;
> $arr[2]=12;
> $arr[3]=13;
> echo "<form method=\"post\" method=\"prova1.php\">";
> echo "<input type=\"hidden\" name=\"arr[]\"
> value=\"$arr\">";
> echo "<input type=submit value=\"NEXT\">";
> echo "</form>";
> ?>
> -------------------------------------------
> -------------------------------------------
> File prova1.php:
> -------------------------------------------
> <?
> echo "$arr[1] - $arr[2] - $arr[3]";
> ?>
> -------------------------------------------
> -------------------------------------------
> The output of prova1.php on Netscape is:
>
> - -
>
> I hope someone can help me.
> Best regards.
> Mirko
--