well i found the problem to #1. i forgot an = on the for() loop.. so it uploads all 6 instead of 5. still looking for a solution on #2 ----- Original Message ----- From: "Sebastian" <sebastian@xxxxxxxxxxxxxxxxxxx> To: <php-general@xxxxxxxxxxxxx> Sent: Tuesday, January 11, 2005 8:59 PM Subject: weird upload problem > Hi, > im working on this mulitiple upload script to auto resize images. everything > works, except two problems. > 1) for some odd reason if i attach all fields with an image it only submits > 5. seems its skipping one. > 2) if i attach an image to field 1, 3, 5 and skip the other fields only 1 > file gets uploaded.. how do i make it so it doesnt matter which fields are > used? just submit whatever fields(s) are used.. i snipped a lot of the code > off the script so its easier to find the problem.. maybe i just overlooked > something. > > <form action="/" enctype="multipart/form-data" method="post"> > 1: <input type="file" name="image[]"><br /> > 2: <input type="file" name="image[]"><br /> > 3: <input type="file" name="image[]"><br /> > 4: <input type="file" name="image[]"><br /> > 5: <input type="file" name="image[]"><br /> > 6: <input type="file" name="image[]"><br /> > <input name="submit" type="submit" value="submit"> > </form> > > > if (isset($_FILES['image'])) > { > $number = 0; > for ($i = 0; $i < count($_FILES['image']); $i++) > { > $number++; > $imageid = time(); > > resize_img('image', $imageid.$number, $original_width, > $original_height)); > resize_img('image', 't'.$imageid.$number, $new_width, $new_height)); > > } > } > > -- > 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