Click to See Complete Forum and Search --> : FORM and attachment


mike_kati
08-15-2006, 08:07 PM
hello
How can you add an attachment onto a form?

I want people to email me images (very big files) to myu email... how can this be done?

thanks

Coulix
08-15-2006, 09:50 PM
You need a <input type=file name=image>, And enctype="multipart/form-data" in the <form> tag. Forms use HTTP POST to send data over the browser to the server.

When your server has received the form and file, you generate headers in the mail to attach the uploaded file and send. You can read a bit more about mail headers on http://no.php.net/mail.

Compguy Pete
08-16-2006, 12:51 PM
This is one of the most difficult things to do.

There are a lot of factors to consider.

What type of site are coding now? html, php, asp, or something else?

asterix
11-16-2006, 05:04 PM
I would give PHPMailer (http://phpmailer.sourceforge.net/) a try. You can integrate the class with your form handler to have images mailed as attachments.

Alex
----------
Contract Web Development (http://www.contractwebdevelopment.com)