ciao a tutti!
allora, ho un form in flash, ci sn i vari campi di inserimento, ognuno col suo nome, il pulsante INVIA ha questo as associato:
allora, innanzi tutto cuqndo clicco INVIA mi si apre una nuova pagina bianca,codice:on (release) { if (nome ne "" and email ne "") { gotoAndPlay("invio"); loadVariables("sendmail.php", "POST"); } else { errore.gotoAndPlay("no"); } }
poi, arriva la mail inviata dal form, MA dentro ho solo la scritta "richieste /commenti" e per giunta vuota!
niente nome.. cognome.. ecc
questo il codice PHP:
grazie mille a tutticodice:<?php /***************************************************\ * PHP 4.1.0+ version of email script. For more * information on the mail() function for PHP, see * http://www.php.net/manual/en/function.mail.php \***************************************************/ $sendTo = "MIAMAIL"; $subject = "messaggio dal sito web"; $adminaddress = "MIAMAIL"; $headers = "From: " . $_POST["nome"] ." <" . $_POST["email"] .">\r\n"; $headers .= "Return-path: " . $_POST["email"]; // now we can add the content of the message to a body variable $message = "Nome e cognome : " . $_POST["nome"] . "\r\n"; $message = "Azienda : " . $_POST["azienda"] . "\r\n"; $message = "Indirizzo : " . $_POST["indirizzo"] . "\r\n"; $message = "Telefono : " . $_POST["tel"] . "\r\n"; $message = "Fax : " . $_POST["fax"]. "\r\n"; $message = "E-mail : " . $_POST["email"]. "\r\n"; $message = "Richieste / Commenti : " . $_POST["richieste"] ; // once the variables have been defined, they can be included // in the mail function call which will send you an email mail($sendTo, $subject, $message, $headers); //Qui si manda la risposta al vostro visitatore! mail("$email","Grazie per aver visitato $sitename","La vostra e-mail sara' visionata al piu' presto" ,"FROM:$adminaddress"); //Non modificate qui $sendresult = "Done!"; $send_answer = "answer="; $send_answer .= rawurlencode($sendresult); // echo "$send_answer"; ?>

Rispondi quotando