Array as hidden input, again
| From: | Mirko Nalesso | Date: | Thu, 28 Sep 2000 12:42:11 +0000 |
| Subject: | Array as hidden input, again | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-3136@lists.php.net to get a copy of this message | ||
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