/* This is the HTML code, I am posting this to a file called thumbnail_generator.php */ // This is the upload section of thumbnail_generator.php $pictures = $_POST['pictures']; foreach ($_FILES["pictures"]["error"] as $key => $error) { if ($error == UPLOAD_ERR_OK) { $tmp_name = $_FILES["pictures"]["tmp_name"][$key]; $name = $_FILES["pictures"]["name"][$key]; move_uploaded_file($tmp_name, "tmp/$name"); print "Success!"; } }