You may also want to take a look at
http://us.php.net/features.file-upload.  That is a good resource for
starting in file uploads.

-Logan

-----Original Message-----
From: Stephen [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 09, 2007 8:54 PM
To: PHP-General
Subject: [PHP] Curious Problem with $_POST

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

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

Reply via email to