This is a snippet of a Free formail script. The full instructions of which can be found here [url]http://www.dtheatre.com/scripts/formmail_doc.php
Does anyone know how this can be made to support 3 attachments instead of 1?
I’ve tride duplicating that bit of code and sticking a 2 on the end of each ‘attachment’ and obviously changing the ‘browse’ upload button the ‘attachment2’ from ‘attachment’
Elsewhere in the full script it supports having 2 or more files uploaded to a directory, so I’m hoping its not that difficult to amend.
I’d be most grateful.
// check for an attachment if there is a file upload it
if ($attachment_name) {
if ($attachment_size > 0) {
if (!$attachment_type) $attachment_type = “application/unknown”;
$content .= “Attached File: “.$attachment_name.”n”;
$fp = fopen($attachment, “r”);
$attachment_chunk = fread($fp, filesize($attachment));
$attachment_chunk = base64_encode($attachment_chunk);
$attachment_chunk = chunk_split($attachment_chunk);
}
}
Cheers