ciao a tutti,
ho un form per l'invio dati direttamente dal sito... ora mi occorrerebbe anche allegarci 1 file... riuscite ad aiutarmi?
grazie
questo e' i mio attuale form
<?php
// L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
$to = "info@distribuzione-informatica.com";
// IL SOGGETTO DELLA MAIL
$subject = "Modulo proveniente dal sito AgenziaGOLD";
// COSTRUIAMO IL CORPO DEL MESSAGGIO
$body = "Contenuto del modulo:\n\n";
$body .= "Nome: " . trim(stripslashes($_POST["nome"])) . "\n";
$body .= "Cognome: " . trim(stripslashes($_POST["cognome"])) . "\n";
$body .= "Nazionalita': " . trim(stripslashes($_POST["nazione"])) . "\n";
$body .= "Data di nascita: " . trim(stripslashes($_POST["data_nascita"])) . "\n";
$body .= "Telefono: " . trim(stripslashes($_POST["telefono"])) . "\n";
$body .= "Altezza: " . trim(stripslashes($_POST["altezza"])) . "\n";
$body .= "Peso: " . trim(stripslashes($_POST["peso"])) . "\n";
$body .= "Seno: " . trim(stripslashes($_POST["seno"])) . "\n";
$body .= "Occhi: " . trim(stripslashes($_POST["occhi"])) . "\n";
$body .= "Capelli: " . trim(stripslashes($_POST["capelli"])) . "\n";
$body .= "Taglia pantaloni: " . trim(stripslashes($_POST["pantaloni"])) . "\n";
$body .= "In quale citta' vivi: " . trim(stripslashes($_POST["citta"])) . "\n";
$body .= "Sei disponibile a spostamenti: " . trim(stripslashes($_POST["spostamenti"])) . "\n";
$body .= "Da quando sei disponibile a spostarti: " . trim(stripslashes($_POST["disponibile"])) . "\n";
// INTESTAZIONI SUPPLEMENTARI
$headers = "From: Modulo utenti";
// INVIO DELLA MAIL
if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO È ANDATO A BUON FINE...
echo "La mail è stata inoltrata con successo." . "\n" . "Sarete ricontattati al piu' presto dal nostro staff";
} else {// ALTRIMENTI...
echo "Si sono verificati dei problemi nell'invio della mail.";
}
?>

Rispondi quotando
