views:

67

answers:

1

Hi friends,

I researched over the internet, but could not find what i need :/

I have a contact form, (php). I dont have any database. it is a simple php email form, but now I need to make it with file attachment :/ how can I email file via contact form? visitor will browse any file from his computer and send email via form.

appreciate!!

+2  A: 

It is explained here: http://www.webcheatsheet.com/php/send%5Femail%5Ftext%5Fhtml%5Fattachment.php

I.devries
thank for the link @Vatos. I actually need to find out how to attach file via form (file input). example at the link looks like not via form file input.
artmania
It's the same thing, just replace:chunk_split(base64_encode(file_get_contents('attachment.zip'))) bychunk_split(base64_encode(file_get_contents($_FILES['your_file_input_name']['tmp_name']')))
I.devries