SysX
08-18-2005, 08:04 AM
can someone please tell me how to get my multiple upload working properly...
I have this in my file.php:
// Added for PHP with register_globals = off
if ($sourcefile == "") {
$sourcefile = $_FILES['sourcefile']['tmp_name'][0];
$sourcefile_size = $_FILES['sourcefile']['size'][0];
$sourcefile_name = $_FILES['sourcefile']['name'][0];
$sourcefile_type = $_FILES['sourcefile']['type'][0];
$sourcefile = $_FILES['sourcefile']['tmp_name'][1];
$sourcefile_size = $_FILES['sourcefile']['size'][1];
$sourcefile_name = $_FILES['sourcefile']['name'][1];
$sourcefile_type = $_FILES['sourcefile']['type'][1];
$sourcefile = $_FILES['sourcefile']['tmp_name'][2];
$sourcefile_size = $_FILES['sourcefile']['size'][2];
$sourcefile_name = $_FILES['sourcefile']['name'][2];
$sourcefile_type = $_FILES['sourcefile']['type'][2];
$sourcefile = $_FILES['sourcefile']['tmp_name'][3];
$sourcefile_size = $_FILES['sourcefile']['size'][3];
$sourcefile_name = $_FILES['sourcefile']['name'][3];
$sourcefile_type = $_FILES['sourcefile']['type'][3];
}
And this in my upload_page.inc:
<tr>
<td class="body" width="20%">
<input type=file name="sourcefile[0]" class="Text220" size="100"><br />
<input type=file name="sourcefile[1]" class="Text220" size="100"><br />
<input type=file name="sourcefile[2]" class="Text220" size="100"><br />
<input type=file name="sourcefile[3]" class="Text220" size="100"><br />
</td>
</tr>
It used to be this:
// Added for PHP with register_globals = off
if ($sourcefile == "") {
$sourcefile = $_FILES['sourcefile']['tmp_name'];
$sourcefile_size = $_FILES['sourcefile']['size'];
$sourcefile_name = $_FILES['sourcefile']['name'];
$sourcefile_type = $_FILES['sourcefile']['type'];
}
And this:
<tr>
<td class="body" width="20%">
<input type=file name="sourcefile" class="Text220" size="100">
</td>
</tr>
and now it's not working properly?
I have this in my file.php:
// Added for PHP with register_globals = off
if ($sourcefile == "") {
$sourcefile = $_FILES['sourcefile']['tmp_name'][0];
$sourcefile_size = $_FILES['sourcefile']['size'][0];
$sourcefile_name = $_FILES['sourcefile']['name'][0];
$sourcefile_type = $_FILES['sourcefile']['type'][0];
$sourcefile = $_FILES['sourcefile']['tmp_name'][1];
$sourcefile_size = $_FILES['sourcefile']['size'][1];
$sourcefile_name = $_FILES['sourcefile']['name'][1];
$sourcefile_type = $_FILES['sourcefile']['type'][1];
$sourcefile = $_FILES['sourcefile']['tmp_name'][2];
$sourcefile_size = $_FILES['sourcefile']['size'][2];
$sourcefile_name = $_FILES['sourcefile']['name'][2];
$sourcefile_type = $_FILES['sourcefile']['type'][2];
$sourcefile = $_FILES['sourcefile']['tmp_name'][3];
$sourcefile_size = $_FILES['sourcefile']['size'][3];
$sourcefile_name = $_FILES['sourcefile']['name'][3];
$sourcefile_type = $_FILES['sourcefile']['type'][3];
}
And this in my upload_page.inc:
<tr>
<td class="body" width="20%">
<input type=file name="sourcefile[0]" class="Text220" size="100"><br />
<input type=file name="sourcefile[1]" class="Text220" size="100"><br />
<input type=file name="sourcefile[2]" class="Text220" size="100"><br />
<input type=file name="sourcefile[3]" class="Text220" size="100"><br />
</td>
</tr>
It used to be this:
// Added for PHP with register_globals = off
if ($sourcefile == "") {
$sourcefile = $_FILES['sourcefile']['tmp_name'];
$sourcefile_size = $_FILES['sourcefile']['size'];
$sourcefile_name = $_FILES['sourcefile']['name'];
$sourcefile_type = $_FILES['sourcefile']['type'];
}
And this:
<tr>
<td class="body" width="20%">
<input type=file name="sourcefile" class="Text220" size="100">
</td>
</tr>
and now it's not working properly?