Ciao a tutti,spero di non aver sbagliato la sessione,in tal caso chiedo scusa.
Ho un problema con il form,non riesco a capire dove sbaglio
ho creato un form mail per un sito,e provandolo on line,all'invio mi dice che il messaggio è stato spedito ma in realtà sulla mia mail (ho provato sia con aruba che con hotmail) arriva una cosa del genere:
www.sendspace.com/file/1tpn5v
cioè il soggetto della mail è "undefined" e anche il testo nonostante io abbia scritto "ciao",è "undefined"
il codice in output è il seguente:
<?
if(!empty($HTTP_POST_VARS['php_nome']) || !empty($HTTP_POST_VARS['php_email']) || !empty($HTTP_POST_VARS['php_web']) || !empty($HTTP_POST_VARS['php_msg']))
{
//Inserire la propria mail nel parametro $to
$to = "info@trexemedesign.it";
$subject = stripslashes("Hai ricevuto una mail da " . $HTTP_POST_VARS['php_Nido dei Fiori']);
$body = stripslashes($HTTP_POST_VARS['php_msg']);
$body .= "\n\n---------------------------\n";
$body .= "Da: " . $HTTP_POST_VARS['php_nome'] . " <" . $HTTP_POST_VARS['php_email'] . ">\n" . $HTTP_POST_VARS['php_web'];
$header = "From: " . $HTTP_POST_VARS['php_nome'] . " <" . $HTTP_POST_VARS['php_email'] . ">\n" . $HTTP_POST_VARS['php_web'];
$header .= "Reply-To: " . $HTTP_POST_VARS['php_nome'] . " <" . $HTTP_POST_VARS['php_email'] . ">\n" . $HTTP_POST_VARS['php_web'];
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "X-Priority: 1";
if(@mail($to, $subject, $body, $header))
{
echo "output=sent";
} else {
echo "output=error";
}
} else {
echo "output=error";
}
?>
lo sbaglio è nel codice?
p.s.OLTRE ALL'INDIRIZZO MAIL DESTINATARIO,CI HO MESSO IL NOME DEL MITTENTE,FORSE SBAGLIO LI?
Ho un problema con il form,non riesco a capire dove sbaglio
ho creato un form mail per un sito,e provandolo on line,all'invio mi dice che il messaggio è stato spedito ma in realtà sulla mia mail (ho provato sia con aruba che con hotmail) arriva una cosa del genere:
www.sendspace.com/file/1tpn5v
cioè il soggetto della mail è "undefined" e anche il testo nonostante io abbia scritto "ciao",è "undefined"
il codice in output è il seguente:
<?
if(!empty($HTTP_POST_VARS['php_nome']) || !empty($HTTP_POST_VARS['php_email']) || !empty($HTTP_POST_VARS['php_web']) || !empty($HTTP_POST_VARS['php_msg']))
{
//Inserire la propria mail nel parametro $to
$to = "info@trexemedesign.it";
$subject = stripslashes("Hai ricevuto una mail da " . $HTTP_POST_VARS['php_Nido dei Fiori']);
$body = stripslashes($HTTP_POST_VARS['php_msg']);
$body .= "\n\n---------------------------\n";
$body .= "Da: " . $HTTP_POST_VARS['php_nome'] . " <" . $HTTP_POST_VARS['php_email'] . ">\n" . $HTTP_POST_VARS['php_web'];
$header = "From: " . $HTTP_POST_VARS['php_nome'] . " <" . $HTTP_POST_VARS['php_email'] . ">\n" . $HTTP_POST_VARS['php_web'];
$header .= "Reply-To: " . $HTTP_POST_VARS['php_nome'] . " <" . $HTTP_POST_VARS['php_email'] . ">\n" . $HTTP_POST_VARS['php_web'];
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "X-Priority: 1";
if(@mail($to, $subject, $body, $header))
{
echo "output=sent";
} else {
echo "output=error";
}
} else {
echo "output=error";
}
?>
lo sbaglio è nel codice?
p.s.OLTRE ALL'INDIRIZZO MAIL DESTINATARIO,CI HO MESSO IL NOME DEL MITTENTE,FORSE SBAGLIO LI?