Re: Curious Problem with $_POST - Solved

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My upload_max_filesize in php.ini was 2M

Doh

It is documented that if the upload is larger $_POST and $_FILES are empty. Hidden a bit, but it is there!

Thanks all
Stephen

Stephen wrote:
I have a form for uploading files. It is intended to upload photos. I have it listed at the end.

When I upload a jpg everything is fine. The $_POST variable is populated as expected.

If I upload a zip file, it is empty!

print_r ($_POST); gives

Array ( )

If I upload a jpg Print_r gives:

Array ( [form] => uploadimagesform [MAX_FILE_SIZE] => 100000 [category] => 1 [photo_caption] => Array ( [0] => [1] => [2] => [3] => ) [submit] => Add Photos )

I am at a total loss to understand this, and don't know where to begin.

Help!

Thanks in advance
Stephen

<form enctype="multipart/form-data" action="up.php" method="post" name="upload_form"><br />
   <input name="form" type="hidden" value="uploadimagesform" />
   <label for="category">Select Category</label>
   <select id="category" name="category">
       <option value=1>Name</option>
       <option value=2>Purple</option>
   </select><br /><br />
   <label for="Photo1">Photo 1:</label>
<input id="photo_filename[]" name="photo_filename[]" type="file" /><br />
   <label for="Caption1">Caption: </label>
<textarea id="photo_caption[]" name="photo_caption[]"></textarea><br /><br /> <label for="Photo2">Photo 2:</label> <input id="photo_filename[]" name="photo_filename[]" type="file" /><br />
   <label for="Caption2">Caption: </label>
<textarea id="photo_caption[]" name="photo_caption[]"></textarea><br /><br /> <label for="Photo3">Photo 3:</label> <input id="photo_filename[]" name="photo_filename[]" type="file" /><br />
   <label for="Caption3">Caption: </label>
<textarea id="photo_caption[]" name="photo_caption[]"></textarea><br /><br /> <label for="Photo4">Photo 4:</label> <input id="photo_filename[]" name="photo_filename[]" type="file" /><br />
   <label for="Caption4">Caption: </label>
<textarea id="photo_caption[]" name="photo_caption[]"></textarea><br /><br /> <input type="submit" name="submit" value="Add Photos" />
</form>


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux