Jump to content

Archived

This topic is now archived and is closed to further replies.

pakenney38

Want to upload several files to a folder at once from form

Recommended Posts

I have some rough code of what I want to happen, but when I submit the form with all fields set, the browser either returns "The page cannot be displayed" or "There was an error uploading filename, please try again!" Really annoying. Can it be that I am just not permitted to upload several files at once, or am I going about this wrong?

The form page:
[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>File Upload Form</title>
</head>

<body>
<form enctype="multipart/form-data" action="procupload.php" method="POST">
  <p align="center"><img src="../picts/logonospace.JPG" alt="gojet" width="399" height="132" /><br />
    <strong><font face="Arial, Helvetica, sans-serif">FILE UPLOAD</font></strong><br />
    <input type="hidden" name="MAX_FILE_SIZE" value="100000000" />
  </p>
  <p align="center"><font face="Arial, Helvetica, sans-serif"><strong>Instructions</strong>: Click Browse to find and add each file to upload.<br />
    If you do not want to include one or more files, don't click Browse for the appropriate documents. Just leave those fields blank.<br />
    When you have finished adding all appropriate documents click the Uploads Files.</font></p>
  <p align="center"><strong><font size="2" face="Arial, Helvetica, sans-serif">Manuals Revisions</font></strong>   
    <input name="uploadedfile" type="file" />
  </p>
  <hr />
  <div align='center'>
  <table width="780" border="0">
    <tr bgcolor="#CCCCCC">
      <td width="355"><strong><font size="2" face="Arial, Helvetica, sans-serif">Company Drug and Alcohol Program </font></strong></td>
      <td width="415"><p>
        <input name="uploadedfile2" type="file" /></p>      </td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Crew Records Policies and Procedures </font></strong></td>
      <td><input name="uploadedfile22" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Crew Scheduling Policies and Procedures </font></strong></td>
      <td><input name="uploadedfile23" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">External Walkaround Checklist </font></strong></td>
      <td><input name="uploadedfile24" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Normal Checklist </font></strong></td>
      <td><input name="uploadedfile25" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Takeoff and Landing Speed Book </font></strong></td>
      <td><input name="uploadedfile26" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Customer Service Policies and Procedures </font></strong></td>
      <td><input name="uploadedfile27" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Dispatch Policies and Procedures Manual </font></strong></td>
      <td><input name="uploadedfile28" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Flight Attendant Training Manual </font></strong></td>
      <td><input name="uploadedfile29" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Flight Operations Training Dept. Policies and Procedures </font></strong></td>
      <td><input name="uploadedfile211" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Flight Operations Training Manual Vol. 1 </font></strong></td>
      <td><input name="uploadedfile212" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Flight Operations Training Manual Vol. 2 </font></strong></td>
      <td><input name="uploadedfile213" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Flight Operations Training Manual Vol. 3 </font></strong></td>
      <td><input name="uploadedfile214" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">General Operations Manual </font></strong></td>
      <td><input name="uploadedfile215" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">General Maintenance Manual Vol. 1 </font></strong></td>
      <td><input name="uploadedfile216" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">General Maintenance Manual Vol. 2 </font></strong></td>
      <td><input name="uploadedfile217" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">General Maintenance Manual Vol. 4 </font></strong></td>
      <td><input name="uploadedfile218" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Inflight Service Policies and Procedures Manual </font></strong></td>
      <td><input name="uploadedfile219" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Inflight Training Policies and Procedures Manual </font></strong></td>
      <td><input name="uploadedfile220" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Maintenance Training Manual </font></strong></td>
      <td><input name="uploadedfile2212" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Minimum Equipment List </font></strong></td>
      <td><input name="uploadedfile221" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Run and Taxi Manual </font></strong></td>
      <td><input name="uploadedfile222" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Safety/Regulatory Compliance Manual </font></strong></td>
      <td><input name="uploadedfile223" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Special Procedures (SP) General Manual </font></strong></td>
      <td><input name="uploadedfile224" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Standard Operating Procedures </font></strong></td>
      <td><input name="uploadedfile225" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">System Administration Manual </font></strong></td>
      <td><input name="uploadedfile226" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Trauma Response Manual </font></strong></td>
      <td><input name="uploadedfile227" type="file" /></td>
    </tr>
    <tr>
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Vendor Line Service Manual </font></strong></td>
      <td><input name="uploadedfile228" type="file" /></td>
    </tr>
    <tr bgcolor="#CCCCCC">
      <td><strong><font size="2" face="Arial, Helvetica, sans-serif">Winter Operation Ground Icing Program </font></strong></td>
      <td><input name="uploadedfile229" type="file" /></td>
    </tr>
  </table>
  </div>
  <p align="center">
    <input type="submit" value="Upload Files" />
  </p>
</form>
</body>
</html>
[/code]

Results Page:
[code]<?PHP
$target_path = "/uploads/";

$newfilename = "REV.pdf";
$target_path0 = $target_path . $newfilename;
$newfilename1 = "DAPM.pdf";
$target_path1 = $target_path . $newfilename1;
$newfilename2 = "CRPP.pdf";
$target_path2 = $target_path . $newfilename2;
$newfilename3 = "CRWS.pdf";
$target_path3 = $target_path . $newfilename3;
$newfilename4 = "XCHK.pdf";
$target_path4 = $target_path . $newfilename4;
$newfilename5 = "NCHK.pdf";
$target_path5 = $target_path . $newfilename5;
$newfilename6 = "SPEED.pdf";
$target_path6 = $target_path . $newfilename6;
$newfilename7 = "CSPP.pdf";
$target_path7 = $target_path . $newfilename7;
$newfilename8 = "DPPM.pdf";
$target_path8 = $target_path . $newfilename8;
$newfilename9 = "FATM.pdf";
$target_path9 = $target_path . $newfilename9;
$newfilename10 = "FTPP.pdf";
$target_path10 = $target_path . $newfilename10;
$newfilename11 = "FOTM1.pdf";
$target_path11 = $target_path . $newfilename11;
$newfilename12 = "FOTM2.pdf";
$target_path12 = $target_path . $newfilename12;
$newfilename13 = "FOTM3.pdf";
$target_path13 = $target_path . $newfilename13;
$newfilename14 = "GOM.pdf";
$target_path14 = $target_path . $newfilename14;
$newfilename15 = "GMM1.pdf";
$target_path15 = $target_path . $newfilename15;
$newfilename16 = "GMM2.pdf";
$target_path16 = $target_path . $newfilename16;
$newfilename17 = "GMM4.pdf";
$target_path17 = $target_path . $newfilename17;
$newfilename18 = "ISPP.pdf";
$target_path18 = $target_path . $newfilename18;
$newfilename19 = "ITPP.pdf";
$target_path19 = $target_path . $newfilename19;
$newfilename20 = "MXTM.pdf";
$target_path20 = $target_path . $newfilename20;
$newfilename21 = "MEL.pdf";
$target_path21 = $target_path . $newfilename21;
$newfilename22 = "RATM.pdf";
$target_path22 = $target_path . $newfilename22;
$newfilename23 = "SAFE.pdf";
$target_path23 = $target_path . $newfilename23;
$newfilename24 = "SPG.pdf";
$target_path24 = $target_path . $newfilename24;
$newfilename25 = "SOP.pdf";
$target_path25 = $target_path . $newfilename25;
$newfilename26 = "SAM.pdf";
$target_path26 = $target_path . $newfilename26;
$newfilename27 = "TRM.pdf";
$target_path27 = $target_path . $newfilename27;
$newfilename28 = "VLSM.pdf";
$target_path28 = $target_path . $newfilename28;
$newfilename29 = "WOP.pdf";
$target_path29 = $target_path . $newfilename29;

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path0)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path1)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename1, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path2)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename2, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path3)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename3, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path4)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename4, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path5)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename5, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path6)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename6, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path7)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename7, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path8)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename8, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path9)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename9, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path10)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename10, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path11)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename11, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path12)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename12, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path13)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename13, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path14)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename14, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path15)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename15, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path16)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename16, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path17)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename17, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path18)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename18, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path19)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename19, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path20)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename20, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path21)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename21, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path22)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename22, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path23)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename23, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path24)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename24, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path25)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename25, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path26)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename26, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path27)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename27, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path28)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename28, please try again!";
}

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path29)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded";
} else{
    echo "There was an error uploading $newfilename29, please try again!";
}
?>[/code]

Share this post


Link to post
Share on other sites
uh, maybe foreach or while or something, more of for each, $_FILES
that will run through each one.

Share this post


Link to post
Share on other sites
nm - I just found the problem. too many 'uploadedfile' when the reoccuring items should be 'uploadedfileXX'.

Share this post


Link to post
Share on other sites
Still have the "The page cannot be displayed" problem when I try to upload more than 2 files at once. Is there a cap on the number of files? Maybe it's a restriction in IE and FireFox? I also made my corrections to the results page:

[code]<?PHP
$target_path = "/uploads/";

$newfilename = "REV.pdf";
$target_path0 = $target_path . $newfilename;
$newfilename1 = "DAPM.pdf";
$target_path1 = $target_path . $newfilename1;
$newfilename2 = "CRPP.pdf";
$target_path2 = $target_path . $newfilename2;
$newfilename3 = "CRWS.pdf";
$target_path3 = $target_path . $newfilename3;
$newfilename4 = "XCHK.pdf";
$target_path4 = $target_path . $newfilename4;
$newfilename5 = "NCHK.pdf";
$target_path5 = $target_path . $newfilename5;
$newfilename6 = "SPEED.pdf";
$target_path6 = $target_path . $newfilename6;
$newfilename7 = "CSPP.pdf";
$target_path7 = $target_path . $newfilename7;
$newfilename8 = "DPPM.pdf";
$target_path8 = $target_path . $newfilename8;
$newfilename9 = "FATM.pdf";
$target_path9 = $target_path . $newfilename9;
$newfilename10 = "FTPP.pdf";
$target_path10 = $target_path . $newfilename10;
$newfilename11 = "FOTM1.pdf";
$target_path11 = $target_path . $newfilename11;
$newfilename12 = "FOTM2.pdf";
$target_path12 = $target_path . $newfilename12;
$newfilename13 = "FOTM3.pdf";
$target_path13 = $target_path . $newfilename13;
$newfilename14 = "GOM.pdf";
$target_path14 = $target_path . $newfilename14;
$newfilename15 = "GMM1.pdf";
$target_path15 = $target_path . $newfilename15;
$newfilename16 = "GMM2.pdf";
$target_path16 = $target_path . $newfilename16;
$newfilename17 = "GMM4.pdf";
$target_path17 = $target_path . $newfilename17;
$newfilename18 = "ISPP.pdf";
$target_path18 = $target_path . $newfilename18;
$newfilename19 = "ITPP.pdf";
$target_path19 = $target_path . $newfilename19;
$newfilename20 = "MXTM.pdf";
$target_path20 = $target_path . $newfilename20;
$newfilename21 = "MEL.pdf";
$target_path21 = $target_path . $newfilename21;
$newfilename22 = "RATM.pdf";
$target_path22 = $target_path . $newfilename22;
$newfilename23 = "SAFE.pdf";
$target_path23 = $target_path . $newfilename23;
$newfilename24 = "SPG.pdf";
$target_path24 = $target_path . $newfilename24;
$newfilename25 = "SOP.pdf";
$target_path25 = $target_path . $newfilename25;
$newfilename26 = "SAM.pdf";
$target_path26 = $target_path . $newfilename26;
$newfilename27 = "TRM.pdf";
$target_path27 = $target_path . $newfilename27;
$newfilename28 = "VLSM.pdf";
$target_path28 = $target_path . $newfilename28;
$newfilename29 = "WOP.pdf";
$target_path29 = $target_path . $newfilename29;

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path0)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile2']['tmp_name'], $target_path1)) {
    echo "The file ".  basename( $_FILES['uploadedfile2']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename1, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile22']['tmp_name'], $target_path2)) {
    echo "The file ".  basename( $_FILES['uploadedfile22']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename2, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile23']['tmp_name'], $target_path3)) {
    echo "The file ".  basename( $_FILES['uploadedfile23']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename3, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile24']['tmp_name'], $target_path4)) {
    echo "The file ".  basename( $_FILES['uploadedfile24']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename4, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile25']['tmp_name'], $target_path5)) {
    echo "The file ".  basename( $_FILES['uploadedfile25']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename5, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile26']['tmp_name'], $target_path6)) {
    echo "The file ".  basename( $_FILES['uploadedfile26']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename6, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile27']['tmp_name'], $target_path7)) {
    echo "The file ".  basename( $_FILES['uploadedfile27']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename7, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile28']['tmp_name'], $target_path8)) {
    echo "The file ".  basename( $_FILES['uploadedfile28']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename8, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile29']['tmp_name'], $target_path9)) {
    echo "The file ".  basename( $_FILES['uploadedfile29']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename9, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile211']['tmp_name'], $target_path10)) {
    echo "The file ".  basename( $_FILES['uploadedfile211']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename10, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile212']['tmp_name'], $target_path11)) {
    echo "The file ".  basename( $_FILES['uploadedfile212']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename11, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile213']['tmp_name'], $target_path12)) {
    echo "The file ".  basename( $_FILES['uploadedfile213']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename12, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile214']['tmp_name'], $target_path13)) {
    echo "The file ".  basename( $_FILES['uploadedfile214']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename13, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile215']['tmp_name'], $target_path14)) {
    echo "The file ".  basename( $_FILES['uploadedfile215']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename14, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile216']['tmp_name'], $target_path15)) {
    echo "The file ".  basename( $_FILES['uploadedfile216']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename15, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile217']['tmp_name'], $target_path16)) {
    echo "The file ".  basename( $_FILES['uploadedfile217']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename16, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile218']['tmp_name'], $target_path17)) {
    echo "The file ".  basename( $_FILES['uploadedfile218']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename17, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile219']['tmp_name'], $target_path18)) {
    echo "The file ".  basename( $_FILES['uploadedfile219']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename18, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile220']['tmp_name'], $target_path19)) {
    echo "The file ".  basename( $_FILES['uploadedfile220']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename19, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile2212']['tmp_name'], $target_path20)) {
    echo "The file ".  basename( $_FILES['uploadedfile2212']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename20, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile221']['tmp_name'], $target_path21)) {
    echo "The file ".  basename( $_FILES['uploadedfile221']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename21, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile222']['tmp_name'], $target_path22)) {
    echo "The file ".  basename( $_FILES['uploadedfile222']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename22, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile223']['tmp_name'], $target_path23)) {
    echo "The file ".  basename( $_FILES['uploadedfile223']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename23, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile224']['tmp_name'], $target_path24)) {
    echo "The file ".  basename( $_FILES['uploadedfile224']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename24, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile225']['tmp_name'], $target_path25)) {
    echo "The file ".  basename( $_FILES['uploadedfile225']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename25, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile226']['tmp_name'], $target_path26)) {
    echo "The file ".  basename( $_FILES['uploadedfile226']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename26, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile227']['tmp_name'], $target_path27)) {
    echo "The file ".  basename( $_FILES['uploadedfile227']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename27, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile228']['tmp_name'], $target_path28)) {
    echo "The file ".  basename( $_FILES['uploadedfile228']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename28, please try again! <br>";
}

if(move_uploaded_file($_FILES['uploadedfile229']['tmp_name'], $target_path29)) {
    echo "The file ".  basename( $_FILES['uploadedfile229']['name']).
    " has been uploaded <br>";
} else{
    echo "There was an error uploading $newfilename29, please try again! <br>";
}
?>[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.