Log in

View Full Version : how to create ADD ATTACHMENT button for email



mohitdangwal
03-22-2012, 01:37 PM
Guys,I want to send emails through my website,for that i need a HTML form that takes inputs like subject,message etc.
My problem is how do I add the "add attachment" button,that on click will generate file tags to upload files. I want the submit button to send the email.
If javascript is required,pls suggest me that also.

actually i dont know how many attachments a user will want to attach,so i need to have the add attachment button,wen a user cliks on it,a file tag opens that lets u select a file similarly to d 1 in yahoo or gmail.pls tell me wat i shud code for that button(add attachment).

Nile
03-22-2012, 10:04 PM
The html for making a file input is:


<input type="file">


However, getting the server to process the attached file and send it in an email is different. It'd be impossible to tell you how without knowing what server side language you're processing this information with, but to get you started, checkout http://www.google.com/search?client=safari&rls=en&q=php+attach+file+to+email&ie=UTF-8&oe=UTF-8.