Jump to content

Send multiple files through email with HTML - PHP


JeroenVnV

Recommended Posts

Dear all,

 

Hopefully someone can help me out with this.

 

I have a HTML form wich contains basic textfields en checkboxes.

Beyond that i have a row with some dropdowns, but one of these fields in the row is a file field.

 

Also, the visitor is able to add a new row, when the user clicks add row, a new row with the same fields including a new file field appears.

This can be done as much as the user likes. The fiel field is optional though, it doesn't need to be filled.

 

All my textfields, checkboxes and dropdowns are coming through email nicely.

 

Only thing that isn't coming my way are the files i attach.

 

My form (stripped but functional) can be seen here

 

http://www.multisearch.info/test/form_test.html

 

For the file fields i take it you need an array wich i have put in the form

 

<input type="file" name="fileupload[]">

 

In my PHP wich handles the form i have this wich should handle the images, but this is not working

if(isset($_POST['submit'])) {
	for($i=0;$i<count($_FILES['fileupload']);$i++) {
		print $_FILES['fileupload']['name'][$i]."<br />";
	}
}

 

I hope someone sees something i am missing.

 

Kind regards,

 

Jeroen

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.