Curious Problem with $_POST
| From: | Stephen | Date: | Tue, 10 Apr 2007 00:53:42 +0000 |
| Subject: | Curious Problem with $_POST | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-252390@lists.php.net to get a copy of this message | ||
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>