Hello All,
I'm having a problem including an array in a hidden field for file
upload.
My first question is, can this be done? Can I actually include an array
in a hidden field on a POSTed PHP upload field?
If so do I have to encode the array. I use array's on my site and am
aware that I have to encode them to pass the values
from page to page but, for some reason I can't pass them thru a
multipart/form-data form upload. The file gets uploaded
with no problem.
If this is not possible is there some other method that I can use to do
this?
My Code:
<form action="<?=$PHP_SELF?>" method="POST" name="sendit"
enctype="multipart/form-data">
<input name="<?= $upload_file_name; ?>" type="file" size="60">
<input type="submit" value="Upload">
<?
echo "<input type=\"hidden" name=\"my_array\" value=\"" .
base64_encode(serialize($my_array)) . "\">";
?>
</form>
Once the file is uploaded $my_array has no value. Is there some catch to
this?
Thanks in advance!