On 7/7/06, Miguel Guirao <[EMAIL PROTECTED]> wrote:


Is there a way to populate an array from one script to the next one?
I'm using a form, and a hidden field for such desire:

<input name="hwt[]" type="hidden" value="<?php echo($hwGSM);?>">

but it returns this:

<input name="hwt[]" type="hidden" value="Array">

then I pretend to read the array again at the target script by coding the 


It should be pretty easy but I have not done it ever!

Miguel Guirao

You have to make inputs for every element of the array. something like this :

foreach($hwGSM AS $key => $value){
echo "<input name='hwt[$key]' type="hidden" value='$value'>

And then after the submit you will have your array $hwt. PHP will make
an array out of all that inputs.

Another option you can use if you want a single input is to serialize
the array, on the form, and then unserialize it in the script
processing the form.


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to