Hey yet again...

I've got a 3x3 grid of type 'file' input elements, for a nifty total of 
9 upload spaces..

After specifying a file in all 9, and attempting upload, I only got 5.. 
I noticed the total filesize was 2 megs, so I changed the php.ini to 8.. 
yet I still got that problem.  So I checked how my file array was being 
posted, and it turns out only 5 of them go through!

Hopefully someone can follow this particular code...
In the HTML Form, we have:

<input type="file" name="picname[0]"><input type="checkbox" disabled 
<input type="file" name="picname[1]"><input type="checkbox" disabled 
<input type="file" name="picname[8]"><input type="checkbox" disabled 

(The picInc array just allows them to set whether or not they really 
want that picture included (in case they mess up and don't want to 
upload such a pic - I wouldn't expect some of the users to be savvy 
enough to know to just delete the text from the field))

In the PHP upload, to check to see which elements are being parsed, I have:

$current = 0;

while (list($key) = each($_FILES['picname'])) {

   echo $current;
   /* -- This is the normal code just to satisfy everyone's curiosity.
   if ($picInc[$current] == true) {

     if (!is_dir($dir))

     if (!is_uploaded_file ($_FILES['picname']['tmp_name'][$current]))
       echo "<b>" . $_FILES['picname']['name'][$current] . "</b> 
couldn't be copied!";

     if (is_uploaded_file ($_FILES['picname']['tmp_name'][$current])) {

       $log_query = "INSERT INTO pictures (pictureID, series) VALUES 
('$pID', '$current')";
       $log_result = mysql_query($log_query) or die ("Couldn't Insert 
Picture Record!");
   */ -- End curiosity mode ;-)

On my output, I just get 01234 .. 5 elements.
My question is specifically on how to get all 9 to upload, those 5 
files,  if specified, do indeed upload fine - just clearing that up :-)

Any insight? 5 elements seems to be something deliberate, but I can't be 
sure, myself.


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

Reply via email to