- Home
- Categorie
- Coding e Sistemistica
- Coding
- e-mail form
-
e-mail form
Ciao phpisti
avrei bisogno del vostro aiuto per favore
Sto facendo una mail form da cui recupero i dati passati da flash tramite actionscript.
L'invio dei dati va benissimo, lo script php li riceve e infatti invia la mail solo che non mi scrive alcune cose.
Ecco il codice:<? if(!empty($HTTP_POST_VARS['sender_name']) || !empty($HTTP_POST_VARS['sender_address']) || !empty($HTTP_POST_VARS['sender_city']) || !empty($HTTP_POST_VARS['sender_phone'])|| !empty($HTTP_POST_VARS['sender_mail'])|| !empty($HTTP_POST_VARS['sender_message'])) { $to = "[email protected]"; $name = "My name: " .($HTTP_POST_VARS['sender_name']); $address = "My address: " .($HTTP_POST_VARS['sender_address']); $city = "My city: " .($HTTP_POST_VARS['sender_city']); $phone = "My phone: " .($HTTP_POST_VARS['sender_phone']); $message = ($HTTP_POST_VARS['sender_message']); $message .= "\n\n---------------------------\n"; $message .= "Mail sent by: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n"; $headers = "From: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n"; $headers .= "Reply-To: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n"; if(@mail($to, $subject, $message, $headers)) { echo "output=sent"; } else { echo "output=error"; } } else { echo "output=error"; } ?>
nella mail che mi arriva non mi scrive questi 4:
$name = "My name: " .($HTTP_POST_VARS['sender_name']);
$address = "My address: " .($HTTP_POST_VARS['sender_address']);
$city = "My city: " .($HTTP_POST_VARS['sender_city']);
$phone = "My phone: " .($HTTP_POST_VARS['sender_phone']);aiuto please
-
up
-
E' normale, non glie li passi
Sostituisci
$message .= "Mail sent by: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";con
$message .= "Mail sent by: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
$message .= $address.$city.$phone;Ps evitiamo di uppare messaggi dello stesso giorno please. Se la risposta la si conosce si risponde volentieri.
Se non si trovano risposte potrebbe essere:- troppo presto
- troppo vaga la domanda
- troppo difficile
-
Grazie massy, mi hai salvato la giornata.