Jump to content

Unable to upload a huge file size


sonnieboy

Recommended Posts

Greetings experts,

 

We have an app that allows our users to upload files to the server and save the filename to the database.

 

This has been working great until today when one of our users attempted to upload a file with size of 97MB.

 

Each time she attempted to upload it, the app breaks within 20 seconds.

 

I have increased the file size in ini file but this has not helped.

 

Any ideas how to fix this?

 

Many thanks in advance.

Link to comment
Share on other sites

Thank you for your prompt response, sir but where should I put this?

 

I tried it at the beginning:

 

 

<?php

set_time_limit(0) //no limit

 

but it didn't work.

 

I also tried it at the beginning of the loop:

		          foreach($_POST['delete'] as $file) {
		           set_time_limit(0);
					$thisfile = __DIR__.'/../uploads/'.$file;
...

What am I doing wrong?

Link to comment
Share on other sites

Putting the limit on top of the script is correct. However, there are a couple of limits which may be involved besides the execution time.

  • First check the PHP error log. Does it say anything?
  • Check the webserver configuration. Is there any limit on file uploads, POST requests or the execution time of scripts?
  • Is post_max_size large enough?

Also check where exactly the process is cancelled (e. g. by writing to a file on top of your script to see if it's even executed).

Edited by Jacques1
Link to comment
Share on other sites

Hi Jacques,

 

Sorry for late response.

 

I wanted to try everything that I could before posting back.

 

When I attempt to upload a file the size of which I indicated above, within 5 seconds, I get:

 

"This Page Cannot be Displayed" error message.

 

This only happens with a large file.

 

When I logged into the error log yesterday, I get the follow:

[16-Feb-2016 14:06:20 America/New_York] PHP Notice:  Undefined index: NumofBids

Today, when I attempt uploading same file, I now get the following error in error log:

[17-Feb-2016 12:00:02 America/New_York] PHP Warning:  POST Content-Length of 458679 bytes exceeds the limit of 1800 bytes in Unknown on line 0

Frustrated

Link to comment
Share on other sites

I think something else is going on and unfortunately, I have no clue what that is.

 

I have just tried 200M like you suggested and I keep getting

This page can’t be displayed

This is a web app that allows users to upload files to the server and save the filename along with other fields to the database.

 

Anything less than 20MB has been fine.

Link to comment
Share on other sites

Thanks JG.

 

I have this at top of php page:

error_reporting(E_ALL);

Is that sufficient?

 

I am not even sure it is making it to the processing page because you see the error almost immediately after clicking the Submit button.

Edited by sonnieboy
Link to comment
Share on other sites

I copied it, replaced the one liner with yours and same result, same "This page cannot be displayed" error.

 

Please allow me to ask a silly question.

 

I have 2 pages, the edit.php file, more like the markup and the processing page called insertEdit.php.

 

If the mode is insert, then insert records. If mode is edit, then edit records.

 

My question is this, I put the two lines of your code in insertEdit.php code.

That's the appropriate page to put them. Am I right?

 

And I put them at the very, very top and yet once I click the submit button, within 5 seconds, I get that message.

 

Thanks for your help.

Link to comment
Share on other sites

<?php
 error_reporting(E_ALL);
 ini_set('display_errors', '1');
?>
<html>
<head>
<style>
.error_reporting	{
	display: none;
	text-align: center;
}
.error_reporting .error_button h2	{
	font-size: 22px;
	margin: 0;
	padding: 0;
}
.error_reporting .error_button p	{
	font-size: 18px;
	margin: 0;
	padding: 0;
}
.error_button	{
	margin: 120px auto;
	margin-left: 300px;
	background-color: green;
	padding: 10px 20px;
	font-family: Arial;
	color: #FFF;
	text-shadow: 1px 1px 3px #000;
	font-size: 16px;
	display: inline-block;
	border-radius: 4px;
	box-shadow: 1px 1px 15px rgba(0,0,0,0.5);
	border: 5px solid #FFF;
	cursor: pointer;
}
table.infotext tr td	{
	cursor: default;
}
table.infotext tr:hover td	{
	background-color: #EBEBEB;
}
</style>
</head>
<body>
<?php

class	ProcessBid
	{
		public		$data;
		public		$statement;
		public		$where_vals;

		protected	$keyname;
		protected	$conn;

		public	function __construct($conn = false)
			{
				$this->conn	=	$conn;
			}

		public	function SaveData($request = array(),$skip = false,$keyname = 'post')
			{
				$this->keyname				=	$keyname;
				$this->data[$this->keyname]	=	$this->FilterRequest($request,$skip);

				return $this;
			}

		public	function FilterRequest($request = array(), $skip = false)
			{
				// See how many post variables are being sent
				if(count($request) > 0) {
						// Loop through post
						foreach($request as $key => $value) {
								// Use the skip
								if($skip == false || (is_array($skip) && !in_array($key,$skip))) {
										// Create insert values
										$vals['vals'][]   =   "'".ms_escape_string($value)."'";

										// Create insert columns
										$vals['cols'][]   =   "".str_replace("txt","",$key)."";

										// For good measure, create an update string
										$vals['update'][] =   "".str_replace("txt","",$key)."".' = '."'".ms_escape_string($value)."'";

										// For modern day binding, we can use this array
										$vals['bind']['cols'][]           =   "".$key."";
										$vals['bind']['cols_bind'][]      =   ":".$key;
										$vals['bind']['vals'][":".$key]   =   $value;
										$vals['bind']['update'][]         =   "".$key.' = :'.$key;
									}
							}
					}

				return (isset($vals))? $vals:false;
			}

		public	function AddFiles($name = 'item')
			{
				// If the files array has been set
				if(isset($_FILES[$name]['name']) && !empty($_FILES[$name]['name'])) {

						// Remove empties
						$_FILES[$name]['name']      =   array_filter($_FILES[$name]['name']);
						$_FILES[$name]['type']      =   array_filter($_FILES[$name]['type']);
						$_FILES[$name]['size']      =   array_filter($_FILES[$name]['size']);
						$_FILES[$name]['tmp_name']  =   array_filter($_FILES[$name]['tmp_name']);

						// we need to differentiate our type array names
						$use_name   =   ($name == 'item')? 'Addend':$name;
						// To start at Addendum1, create an $a value of 1

						$a = 1;
						if(!empty($_FILES[$name]['tmp_name'])) {

								 foreach($_FILES[$name]['name'] as $i => $value ) {
										$file_name  =   ms_escape_string($_FILES[$name]['name'][$i]);
										$file_size  =   $_FILES[$name]['size'][$i];
										$file_tmp   =   $_FILES[$name]['tmp_name'][$i];
										$file_type  =   $_FILES[$name]['type'][$i];

										if(move_uploaded_file($_FILES[$name]['tmp_name'][$i], $this->target.$file_name)) {
												// Format the key values for addendum
												if($name == 'item')
													$arr[$use_name.$a]      =   $file_name;
												// Format the key values for others
												else
													$arr[$use_name] =   $file_name;

												$sql	=   $this->FilterRequest($arr);

												// Auto increment the $a value
												$a++;
											}
									}
							}
					}

				if(isset($sql) && (isset($i) && $i == (count($_FILES[$name]['tmp_name'])-1)))
					$this->data[$name]	=	$sql;

				return $this;
			}

		public	function SaveFolder($target = '../uploads/')
			{
				$this->target	=	$target;

				// Makes the folder if not already made.
				if(!is_dir($this->target))
					mkdir($this->target,0755,true);

				return $this;
			}

		public	function where($array = array())
			{
				$this->where_vals	=	NULL;

				if(is_array($array) && !empty($array)) {
						foreach($array as $key => $value) {
								$this->where_vals[]	=	$key." = '".ms_escape_string($value)."'";
							}
					}

				return $this;
			}

		public	function UpdateQuery()
			{
				$this->data			=	array_filter($this->data);

				if(empty($this->data)) {
						$this->statement	=	false;
						return $this;
					}

				if(isset($this->data) && !empty($this->data)) {

						foreach($this->data as $name => $arr) {
								$update[] =   implode(",",$arr['update']);
							}
					}

				$vars		=	(isset($update) && is_array($update))? implode(",",$update):"";

				// Check that both columns and values are set
				$this->statement	=	(isset($update) && !empty($update))? "update bids set ".implode(",",$update):false;

				if(isset($this->where_vals) && !empty($this->where_vals)) {
						$this->statement	.=	" where ".implode(" and ",$this->where_vals);
					}

				return $this;
			}

		public	function SelectQuery($select = "*",$table = 'bids')
			{
				$stmt				=	(is_array($select) && !empty($select))? implode(",",$select):$select;

				$this->statement	=	"select ".$stmt." from ".$table;

				return $this;
			}

		public	function InsertQuery($table = 'bids')
			{
				$this->data			=	array_filter($this->data);

				if(empty($this->data)) {
						$this->statement	=	false;
						return $this;
					}

				$this->statement	=	"insert into ".$table;

				if(isset($this->data) && !empty($this->data)) {

						foreach($this->data as $name => $arr) {
								$insert['cols'][] =   implode(",",$arr['cols']);
								$insert['vals'][] =   implode(",",$arr['vals']);
							}
					}

				$this->statement	.=	'(';
				$this->statement	.=	(isset($insert['cols']) && is_array($insert['cols']))? implode(",",$insert['cols']):"";
				$this->statement	.=	") VALUES (";
				$this->statement	.=	(isset($insert['vals']) && is_array($insert['vals']))? implode(",",$insert['vals']):"";
				$this->statement	.=	")";

				return $this;
			}
	}
include("../Connections/Connect.php");
function render_error($settings = array("title"=>"Failed","body"=>"Sorry, your submission failed. Please go back and fill out all required information."))
	{ ?>
<h2><?php echo (isset($settings['title']))? $settings['title']:"Error"; ?></h2>
<p><?php echo (isset($settings['body']))? $settings['body']:"An unknown error occurred."; ?></p>
<?php
	}

// this function is used to sanitize code against sql injection attack.
function ms_escape_string($data)
	{
        if(!isset($data) || empty($data))
			return "";

		if(is_numeric($data))
			return $data;

		$non_displayables[]	=	'/%0[0-8bcef]/';	// url encoded 00-08, 11, 12, 14, 15
		$non_displayables[]	=	'/%1[0-9a-f]/';		// url encoded 16-31
		$non_displayables[]	=	'/[\x00-\x08]/';	// 00-08
		$non_displayables[]	=	'/\x0b/';			// 11
		$non_displayables[]	=	'/\x0c/';			// 12
		$non_displayables[]	=	'/[\x0e-\x1f]/';	// 14-31

        foreach($non_displayables as $regex)
            $data	=	preg_replace($regex,'',$data);
	        $data	=	str_replace("'","''",$data);
        return $data;
    }

	// New bid save engine is required for both sql statement generations
	$BidSet	=	new ProcessBid($conn);
	$strId = null;

	if(isset($_POST["Id"]))
	{
		$strId = $_POST["Id"];
		//echo $strId;
	}
	If ($strId == "") {
	//echo "This is an insert statement";
	// This will generate an insert query
	$insert	=	$BidSet->SaveData($_POST)
						->SaveFolder('../uploads/')
						->AddFiles('BidIDFile')
						->AddFiles('item')
						->AddFiles('SignInSheet')
						->AddFiles('TabSheet')
						->AddFiles('Xcontract')
						->InsertQuery()
						->statement;

	// Check that statement is not empty
	if($insert != false) {
			sqlsrv_query($conn,$insert); ?>
			<br><br><br><br><br>
			<div class="error_button">
			 <div style="float: right; font-size: 18px; font-weight: bold; color: #FFF;" onClick="DisplayErrorTag('close')">x</div>
			  <?php render_error(array("title"=>"Record Successfully Saved!","body"=>'Go back to <a href="currentrecs.php">Solicitation screen</a>')); ?>
		     </div>

		  <?php
			$err	=	false;
		}


	//echo '<pre>';
	//print_r($insert);
//	echo '</pre>';
    }
else
{
// Check to see if any images need deleting
if(isset($_POST['delete']) && !empty($_POST['delete'])) {

	// whilelisted table columns
	$fileColumnsInTable[]	= 	'BidIDFile';
	$fileColumnsInTable[]	= 	'Addend1';
	$fileColumnsInTable[]	= 	'Addend2';
	$fileColumnsInTable[]	= 	'Addend3';
	$fileColumnsInTable[]	= 	'Addend4';
	$fileColumnsInTable[]	= 	'Addend5';
	$fileColumnsInTable[]	= 	'Addend6';
	$fileColumnsInTable[]	= 	'TabSheet';
	$fileColumnsInTable[]	= 	'SignInSheet';
	$fileColumnsInTable[]	= 	'Xcontract';


	// Loop through the post to assign delete fields
	foreach($_POST['delete'] as $fileCol => $fileColumn) {
			// If set and allowed to be delete
			if(in_array($fileCol, $fileColumnsInTable)) {
					// Save the columns to temp
					$fileColumns[]		=	$fileCol;
					// Save the file spots as blanks in the main post
					$_POST[$fileCol]	=	'';
				}
		}

	// Check that there are files requiring attention
	if(isset($fileColumns)) {

			$sql_statement	=	"select ".implode(", ",$fileColumns)." from bids where ID = ?";
			$query			=	sqlsrv_query($conn,$sql_statement,array($strId));

			// No files, just return
			if($query === false)
				return $errors	=	'file_fail_link';

			$files 			= 	sqlsrv_fetch_array($query, SQLSRV_FETCH_ASSOC);

//print_r($files);


			// loop over the files returned by the query

		//	foreach ($files as $file) {
		          foreach($_POST['delete'] as $file) {
					$thisfile = __DIR__.'/../uploads/'.$file;


					//delete file

					unlink($thisfile);

			//delete from filename from the database
              $sql   =	"delete ".implode(", ",$fileColumns)." from bids where ID = ?";
              $query =	sqlsrv_query($conn,$sql,array($strId));

				}

        }
}
if(isset($_POST['delete']))
	unset($_POST['delete']);
    {
    //echo "This is an update statement";
	// This will generate an update query
	$update	=	$BidSet->SaveData($_POST,array("Id"))
						->SaveFolder('../uploads/')
						->AddFiles('BidIDFile')
						->AddFiles('Addend1')
						->AddFiles('Addend2')
						->AddFiles('Addend3')
						->AddFiles('Addend4')
						->AddFiles('Addend5')
						->AddFiles('Addend6')
						->AddFiles('SignInSheet')
						->AddFiles('TabSheet')
						->AddFiles('Xcontract')
						->where(array("Id"=>$_POST["Id"]))
						->UpdateQuery()
						->statement;

	//echo '<pre>';
	//print_r($update);
	//echo '</pre>';
	// Check that statement is not empty
	if($update != false) {
			sqlsrv_query($conn,$update); ?>
			<br><br><br><br><br>
			<div class="error_button">
				<div style="float: right; font-size: 18px; font-weight: bold; color: #FFF;" onClick="DisplayErrorTag('close')">x</div>
			<?php render_error(array("title"=>"Record Successfully Saved!","body"=>'Go back to <a href="currentrecs.php">Solicitation screen</a>')); ?>
		  </div>
		<?php
		$err	=	false;
		}
     }
    }

	// This will post an error if the query fails

	if((isset($err) && $err == true) || !isset($err)) { ?>

			<div class="error_button">
				<div style="float: right; font-size: 18px; font-weight: bold; color: #FFF;" onClick="DisplayErrorTag('close')">x</div>
		<?php render_error(); ?>
	</div>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.js"></script>
<script>
	$(".error").fadeIn('slow');
</script>
<script type="text/javascript">
function DisplayErrorTag(SetAction)
	{
		if(SetAction == null) {
			$(".error_reporting").fadeIn('slow');
		//	$(".error_reporting").delay(3000).slideUp('fast');
		}
		else if(SetAction == 'close') {
			$(".error_button").fadeOut('fast');
		}
	}
 </script>
<?php } ?>
</body>
</html>

Sorry, I didn't mean to ignore that. The message is not of my own creation.

 

It is the dreaded IE page cannot be displayed error.

 

Here is the code but please be warned, it is very, very long.

 

Thanks again for  your help.

Link to comment
Share on other sites

How about reducing your code size by NOT including the class. Isn't that a module that you can just include so that we don't have to scroll thru it?

 

These lines make no sense:

if(isset($_POST['delete']))
unset($_POST['delete']);
{

(Around line 367)

 

And not being a big class user this makes no sense to me:

$update = $BidSet->SaveData($_POST,array("Id"))
->SaveFolder('../uploads/')
->AddFiles('BidIDFile')
->AddFiles('Addend1')
->AddFiles('Addend2')
->AddFiles('Addend3')
->AddFiles('Addend4')
.........
.........
;

Is that a valid syntax?>

 

PS - do you realize what a royal pia your code structure is? Nobody is ever going to follow and understand it. Good practice dictates that you separate your html (presentation) code from you logic (php) code to make it easier to read, to decipher, to maintain and then to debug.

 

 

Lastly - If you can - add some echo statements to show the progress that takes place in this quagmire of code so you can at least get close to where the script fails. I suspect it is a fatal error that is not getting output. Have you checked your error_log file for the folder where this code sits?

Edited by ginerjm
Link to comment
Share on other sites

Yes, that's a valid syntax. It works.

 

The AddFiles(...) call is from this function:

public	function AddFiles($name = 'item')

All I was trying to do with the code is have the ability to do three things:

 

Add multiple files at same time.

 

For instance, I have Addend1 through Addend1

 

An item solution would have been to have it like this:

->SaveFolder('../uploads/')
->AddFiles('BidIDFile')
->AddFiles('item')
and the rest


But it doesn't work.

 

The second thing we are trying to accomplish with the code is the ability to delete (unlink) a file during update.

 

Due to my newbiness and its complications to me, I had to do the way I did it.

 

Sorry and thanks again

Link to comment
Share on other sites

Sigh!

 

This is one of your questions:

Is that a valid syntax?>

And I said yes with examples that there is a function called AddFiles(...) and that's how I was calling the function. This has been working for over 6 months until they decided to upload a file of over 97MB of size.

 

Your second paragraph pretty much derided the code with some scolding to boot and I am not complaining because you can't complain when you need help.

 

Your next instruction was to add echos which I did and nothing was coming out except the same "page cannot be displayed".

 

This a point I have made to you previously.

 

The one question I mistakenly did not address was whether I looked into error log.

 

I did and got same thing I told Jacques that I was getting which is:

[17-Feb-2016 12:00:02 America/New_York] PHP Warning:  POST Content-Length of 458679 bytes exceeds the limit of 1800 bytes in Unknown on line 0

In his response, he suggested that post max size was too small at 1800 bytes although I had it at 1800MB.

 

Per his advise, I reduced it to 200MB but still getting same "Page Cannot Be Displayed" error message.

 

The issue from what I could tell is that is not even getting to the processing page.

 

I have these lines at the very top of the page:

<?php
 error_reporting(E_ALL);
 ini_set('display_errors', '1');
?>

From what I can tell so far, based on the "Page Cannot Be Displayed" error I keep getting, it is doesn't appear to be reaching that page.

 

That's why I asked yesterday if I should put that error on the markup page - edit.php page.

 

Thanks again for help JG.

Edited by sonnieboy
Link to comment
Share on other sites

The "deriding" you mention was me pointing out perhaps a misplaced curly brace. If it isn't misplaced then it certainly means that it is unnecessary.

 

As for the echos. If one puts in echos and doesn't get any output what do you think that means? It means you didn't get to them which means you haven't placed them where you think you should be getting to. Or it means the script is failing so miserably that it isn't running at all. Put an echo at the very top (after the error checking lines) and if it doesn't show then your script has serious problems.

Link to comment
Share on other sites

I apologize Jacques.

 

I have it at 200M. I was including the "B" in this thread for emphasis.

 

Another point I would like to make is that if I add an echo to see what ID is being passed from edit.php to the processing page:

<?php
 error_reporting(E_ALL);
 ini_set('display_errors', '1');
	if(isset($_POST["Id"]))
	{
		$strId = $_POST["Id"];
		echo $strId;
	}
 ?>

If it is a relatively small file, it displays the ID.

 

If not, I get "This Page Cannot be Displayed"  if I run it in IE.

 

If I run it in FF, I get,

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Yes, my code likely has something to do with it but huge file size is the big issue.

Link to comment
Share on other sites

I am trying to approach this from a different angle.

 

Here is actual markup is below. Only difference is that I removed several form fields to avoid clutter.

<form id="form1" name="form1" method="POST" action="Process.php" enctype="multipart/form-data"> 
 <table> 
   <tr> 
    <td align="right" valign="top"> 
     <table> 
      <tr> 
       <td class="td_label_form"><span style="color:#ff0000;">*</span>Bid Date </td> 
      </tr> 
     </table></td> 
    <td align="right" valign="top"> 
     <table> 
      <tr> 
       <td class="td_null_checkbox_form"></td> 
      </tr> 
     </table> 
    </td> 
    <td> 
     <table border="0"> 
      <tr> 
       <td class="td_input_form"> 
       <div class="input text"> 
        <input type="text" name="txtBidDate" Id="txtBidDate" value="" style="width:150px;"></div></td> 
       <td class="td_hint_form"></td> 
      </tr> 
     </table> 
    </td> 
   </tr> 
   <tr> 
    <td align="right" valign="top"> 
     <table> 
      <tr> 
       <td class="td_label_form">Description </td> 
      </tr> 
     </table> 
    </td> 
    <td align="right" valign="top"> 
     <table> 
      <tr> 
       <td class="td_null_checkbox_form"> </td> 
      </tr> 
     </table> 
    </td> 
    <td> 
     <table border="0"> 
      <tr> 
       <td class="td_input_form"> 
       <div class="input textarea"> 
       <textarea cols="50" style="width:430px;" name="Description"></textarea></div></td> 
       <td class="td_hint_form"></td> 
      </tr> 
     </table> 
    </td> 
   </tr> 
   <tr> 
    <td align="right" valign="top"> 
     <table> 
      <tr> 
       <td class="td_label_form"><span style="color:#ff0000;">*</span>Bid File </td> 
      </tr> 
     </table> 
    </td> 
    <td align="right" valign="top"> 
     <table> 
      <tr> 
       <td class="td_null_checkbox_form"> </td> 
      </tr> 
     </table> 
    </td> 
    <td> 
     <table border="0"> 
      <tr> 
       <td class="td_input_form"><input type="file" id="BidFile" name="BidFile[]" value="" size="50"></td> 
       <td class="td_hint_form"> </td> 
      </tr> 
     </table> 
    </td> 
   </tr> 
   <tr> 
    <td align="right" valign="top"> 
     <table> 
      <tr> 
       <td class="td_label_form">Addendum 1 </td> 
      </tr> 
     </table> 
    </td> 
    <td align="right" valign="top"> 
     <table> 
      <tr> 
       <td class="td_null_checkbox_form"> </td> 
      </tr> 
     </table> 
    </td> 
    <td> 
     <table border="0"> 
      <tr> 
       <td class="td_input_form"><input type="file" name="Adden1[]" size="50"></td> 
       <td class="td_hint_form"></td> 
      </tr> 
     </table> 
    </td> 
   </tr> 
   <tr> 
    <td align="right" valign="top"> 
     <table> 
      <tr> 
       <td class="td_label_form">Addendum 2 </td> 
      </tr> 
     </table> 
    </td> 
    <td align="right" valign="top"> 
     <table> 
      <tr> 
       <td class="td_null_checkbox_form"> </td> 
      </tr> 
     </table> 
    </td> 
    <td> 
     <table border="0"> 
      <tr> 
       <td class="td_input_form"><input type="file" name="Adden2[]" size="50"></td> 
       <td class="td_hint_form"></td> 
      </tr> 
     </table> 
    </td> 
   </tr> 
   <tr> 
    <td align="right" valign="top"> 
     <table> 
      <tr> 
       <td class="td_label_form">Tag Sheet </td> 
      </tr> 
     </table> 
    </td> 
    <td align="right" valign="top"> 
     <table> 
      <tr> 
       <td class="td_null_checkbox_form"> </td> 
      </tr> 
     </table> 
    </td> 
    <td> 
     <table border="0"> 
      <tr> 
       <td class="td_input_form"><input type="file" name="TagSheet[]" size="50"></td> 
       <td class="td_hint_form"></td> 
      </tr> 
     </table> 
    </td> 
   </tr> 
  </table>

If someone would be kind enough to assist with sample code on how to upload three different files with different input names, I would greatly appreciate it.

 

Right now, I have BidFile, Adden1, Adden2, Tagsheet.

 

Thanks a lot in advance.

Link to comment
Share on other sites

Please, please JG, enough of the negativity.

 

If you really wish to assist, please, please concentrate on the problem that I have and I have provided any useful information for any php guru wishing to assist would need to assist.

 

It is one thing to keep nit picking but to do so without any attempt to help with the real problem I am having is a bit frustrating.

 

My question to anyone wishing to assist:

 

These files have different input names.

 

How do I code it in such that our users are able to upload any or all of the files on a single button click?

<form id="form1" name="form1" method="POST" action="Process.php" enctype="multipart/form-data">
  <input type="file" id="BidFile" name="BidFile[]" value="" size="50">
  <input type="file" name="Adden1[]" size="50">
  <input type="file" name="Adden2[]" size="50">
  <input type="file" name="TagSheet[]" size="50">
</form>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.