se il form html invia i dati tramite richiesta POST, da php li prelevi così ad esempio:

Codice PHP:
$nome $_POST['name'];
$cognome $_POST['surname'];
$foto1 $_POST['imm1'];
$foto2 $_POST['imm2'];
$foto3 $_POST['imm3'];
ecc.

// Io ti faccio l'esempio applicandolo solo a una delle 3 foto
$filetype mime_content_type($foto1);
 
$file fopen($foto1"r");
$contents fread($filefilesize($foto1));
$encoded_attach chunk_split(base64_encode($contents));
fclose($file);
 
// Intestazione della mail
$header "From: $mittente\n";
$header .= "Reply-To: $reply\n";
$header .= "X-Mailer: emailer\n";
$header .= "MIME-version: 1.0\n";
$header .= "Content-type: multipart/mixed;\n";
$header .= " boundary=\"Message-Boundary\"\n";
$header .= "Content-transfer-encoding: 7BIT\n";
$header .= "X-attachments: $foto1";
 
$corpo "--Message-Boundary\n";
$corpo .= "Content-type: text/html; charset=iso-8859-1\n";
$corpo .= "Content-transfer-encoding: 7BIT\n";
$corpo .= "Content-description: Mail message body\n\n";
$corpo .= "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
$corpo .= "<HTML><HEAD>";
$corpo .= "<META http-equiv=Content-Type content=\"text/html; charset=iso-8859-1\">";
$corpo .= $stile;
$corpo .= "</HEAD>";
$corpo .= "<BODY>";
$corpo .= $mex;
$corpo .= "</BODY></HTML>";
$corpo .= "\n\n--Message-Boundary\n";
$corpo .= "Content-type: $filetype; name=\"$foto1\"\n";
$corpo .= "Content-Transfer-Encoding: BASE64\n";
$corpo .= "Content-disposition: attachment; filename=\"$foto1\"\n\n";
$corpo .= "$encoded_attach\n";
$corpo .= "--Message-Boundary--\n";
 
if(@
mail(parametri....))
 ...