Jump to content

pakenney38

Members
  • Posts

    90
  • Joined

  • Last visited

    Never

Posts posted by pakenney38

  1. [quote author=Orio link=topic=115231.msg469146#msg469146 date=1163707424]
    The first key in $date will be 0. So you'll have $date[0], $date[1], $date[2], etc'.
    [/quote]
    Could I use:
    [code]
    $date[x] = $_POST['date'.$x];
    [/code]
    So that it starts with $date[1]?
    Then when I come along and say:
    [code]
    <input name='date1' type='text' id='date1' value='$date[1]' />
    [/code]
    The numbering matches with the field name?
  2. Can anyone tell me if the following would work?
    What I want to do is create x $date variables ($date1, $date2, $date3...) where x is equal $rowcount. Assume the value of $rowcount has already been declared.
    [code]for ($x = 1; $x <= $rowcount; $x++)
    {
    $date$x = $_POST['date$x'];
    }[/code]
    The part I am mostly concerned with is the $date$x part. I've tried this in the past with mixed results and can't remember how I got it to work, or if I even did.
  3. It would be nice to have a serious reply to this topic. First of all, I recently updated all packages through yum, so I know everything is current version. Secondly, are you suggesting I update the RAM? Even the RAM is 2GB. If that's not enough to process say, and 16MB file, then there is some other problem.
  4. You mean like the Web Server? It has 250 GB of hard drive space, 82% of that is available. It also has 2 GB of RAM. I'm confused on how this cannot be adequate.
    Or were you referring to the PC I am sending the files from? I still don't understand how a file that is at most 16MB would eat enough resources on either the client or server to cause this problem. Could you be more specific?
  5. I have a web form that is used to upload some 33 files at once to an "/uploads" folder on my web server, but am having an issue with Apache not wanting to deal with file sizes larger than 6-7MB per file. If I attempt to upload any file larger than that, I get "the page cannot be displayed" in the browser. At first, I blamed PHP. But then I rewrote the processing script in Perl, and now have the same issue with the Perl script. So I have to blame Apache.
  6. I have yet another file upload form that processes some 25 PDF files and uploads them to a linux server folder outside the webroot. Unfortunately, no matter how I configure my php.ini and httpd.conf, I get "the page cannot be displayed" when I try to upload the largest of these files which is 16MB. The form also does not work in Mozilla FireFox. It actually prompts me to download the php page for some reason on submit. This doesn't surprise me as I and others have been having apache issues with the last few versions of Firefox and MIME types. I'm not even concerned if the form ever works in FireFox at this point.
  7. Hi,

    For referrence, I am running Windows XP SP2, FireFox 1.5.0.6, and Adobe Reader 7.08.

    I have a very complex issue, and since I do not understand the inner workings of the Web, I am baffled.
    Whenever I view some PDF files from links on my web server in Internet Explorer, all is well. The Adobe plugin works as it should and the PDF file displays within the browser.
    The same cannot be said for FireFox. Some PDF files on my site work with the Adobe-plugin, others attempt to display as text and wind up looking like garbage. For those files that display with the Adobe-plugin properly, the title bar on FireFox shows the file type as application/pdf. When it displays the PDFs as text, it does not show the file type in the title bar.
    Even more strange - if I download the file and view it outside of FireFox with the Adobe Reader program, then I go back into FireFox and attempt to view the PDF from the link using the Adobe-plugin, then the plugin will display the PDF file properly - [i]only[/i] after I have viewed the file external to Firefox.
    Now, here is some more weird stuff - I have a fresh install of Windows XP SP2 on another computer and have loaded the same version of Adobe Reader and Firefox on that computer and the plugin works properly for all files on the site. Yet another computer from a friend of mine also displays the files properly. He has the same versions of Firefox and Adobe. I have two users of the web site who have Macs with FireFox though and they are having the same problem as me.

    I am trying now to figure out if I have a problem with my PC, or with certain PDF files, or with the web server. Maybe someone else has seen this problem and can shed some light on the subject?
  8. [quote author=karthikeyan_coder link=topic=104398.msg416986#msg416986 date=1155756611]


    1. is it allowing single file uploads..
    2. Is your webserver crashes after this try?
    3. Can you run other scripts after the output "The page cannot be displayed"
    4. just refresh the same page after getting the error..

    Answer me for these questions

    [/quote]

    1. Yes and No, nothing larger than 3-4MB.
    2. No.
    3. Yes.
    4. Refreshing the PHP page results in "The Page Cannot Be Displayed." However, I can go back to the upload form and load that page.

    Here is the HTML Form:
    [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 />
      </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">GoJet 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]

    Here is the PHP Page that processes the form:
    [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]

    I posted this code when asking about another issue, but there have not been any changes to the code since then.
  9. Timeout 120

    max_execution_time = 30
    max_input_time = 60
    memory_limit = 64M  <-- I changed this recently just to try something new.

    Please note that "The Page Cannot Be Displayed" shows up within 4 seconds.
    I have discovered that I can upload more than two files now. All total, I can't do more than 3-4MB though, otherwise "The Page Cannot Be Displayed."

    Again:
    post_max_size 250
    upload_max_filesize 200
  10. So I've got 1 setting in apache "LimitRequestBody" that by default is set to 0, which allows unlimited HTTP request in the body, which is where form data would be passed. I intentionally tried forcing a setting of 0 in my httpd.conf and restarted apache, and nothing changed.
    I am running my PHP server in Fedora Core 5, but I am pretty sure that php.ini still controls many of the settings for php. Two of them that control file upload limit are post_max_size and upload_max_filesize. These were set to something insanely small like 2M. So post_max_size is now 250M and upload_max_filesize is 200M. After making this change, I again restarted apache so that it would reload the php module and process the new php.ini. The original problem persists. I am at a loss.
  11. [quote author=ryanlwh link=topic=104398.msg416380#msg416380 date=1155671708]
    have you tried 20 small files (a total of less than 1M)?? if you can successfully upload these small files, then it's probably a setting in apache that caused the problem.
    [/quote]

    Good call. I just tried uploading 20 4KB text files and they go through just fine, so I will take a look at Apache and come back with an answer for anyone who is interested.
  12. 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]
  13. 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]
  14. Well, for this project I am dealing with some 220 HTML form fields whose values must find their way to a MySQL database. For the sake of my sanity, I am trying to keep the form fields the same name as the PHP variables and the MySQL fields. Also, time is the primary concern for this project, as are all of my projects at work, so generally while coding I like any amount of code that I can copy and paste, even if it's just field names.
  15. For example, I got this to work:

    [code]<?PHP

    for ($counter = 1; $counter <= 200; $counter++)
    {
      $T[$counter] = 'T' . $counter;
      echo $T[$counter] . '<br>';
    }

    if ($T[1])
    {
    echo 'yes<br>';
    }

    else
    {
    echo 'no<br>';
    }

    if ($T[2])
    {
    echo 'yes<br>';
    }

    else
    {
    echo 'no<br>';
    }

    ?>[/code]

    But what if I didn't want my variables to come out named $T[1], $T[2], $T[3]....etc?
    What if I wanted $T1, $T2, $T3....etc?
    How do I do this without setting each variable $T1 through $T200 independently?
×
×
  • Create New...

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.