Hi everyone

Does anyone know of a script that allows multiple file upload while only having one file input on the screen?

I think gmail does this. The user browses for an attachment and then clicks ok, the file is uploaded immediately and then the user can upload another file while any other fields that have been filled in retain their info.

i don't know if anyone is interested by these new flash products but make a try at
http://www.flashuploaded.com
there are nice flash upload components to integrate easily in a website with a upload progress bar time remaining, file/folder manager etc... i tried it and works very well.

Hi there

I'm working on this again but I've run into a snag. What I'm doing at the moment is using i-frames to pull a page that has an input file field into the page where the user will be adding images.

My problem though is that I need to dynamically create a folder based on text input by the user on the main page and send the files that are uploaded in the pages pulled in with the i-frames to that folder.

Is it possible to use data in input fields as variables inside the pages being pulled in by the i-frames?

I'll post some code in a little bit.

Main Page(index.php)

<table width="100%" border="0" cellpadding="5" cellspacing="0">
              <tr>
                <td align="left" valign="top">Folder Name<input type="text" name="folderName" >				
				</td>
                <td align="left" valign="top"><iframe style="border:none;" src="upload_01.php" height="50" width="221"></iframe></td>
              </tr>
            </table>

Page being pulled in with i-frame (upload_01.php)

<table width="210" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>Image 1<input type="file" name="image" id="image" onchange="submit()" /></td>
  </tr>
</table>

So to explain this again...I need to use the name input by the user on index.php inside upload_01.php to create a folder on the server that the image will be uploaded to.

Any help would be greatly appreciated

Umm.. I don't think you can do that. ie., textbox in index.php and file tag in upload_01.php . Why don't you have them both in upload_01.php ? This works for me.

//index.php
<?php
print_r($_POST);
?>
<table width="100%" border="0" cellpadding="5" cellspacing="0">
              <tr>
                <td align="left" valign="top"><iframe style="border:none;" src="upload_01.php" height="650" width="600"></iframe></td>
              </tr>
            </table>

and this is upload_01.php

<form method="post" action="index.php">
<table width="210" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td align="left" valign="top">Folder Name<input type="text" name="folderName" ></td>
    <td>Image 1<input type="file" name="image" id="image" onchange="javascript:form.submit()" /></td>
  </tr>
</table>
</form>

Hey nav33n...long time ;)

The reason I have it the way I do is because I'm going to have 16 iframes on index.php with upload fields in them and I need to move the uploaded images to a folder that is created dynamically using the name that the user types into the text field.

The reason for all this madness is because it's not possible to have more than 4 concurrent connections to the server so when I try to upload more than 4 images, just using file fields on index.php, the images don't get uploaded.

:) Long time indeed!
Hmm.. I don't think its possible, because, when you submit upload_01.php, it will submit that particular script and not index.php. Well, I hope someone else has an answer to your question..

This article has been dead for over six months. Start a new discussion instead.