per farmi capire... questo è il codice (semplificato) del file PHP:
Codice PHP:
<?php
$headers .= "Content-Type: text/html; charset= iso-8859-1\n\n";
/* $dachinome=trim(stripslashes($_POST["nome"]));
$dachiemail="<".trim(stripslashes($_POST["mail"])).">";
$headers .= "From: $dachinome $dachiemail\r\n";*/
$to ="miamail@miamail.com";
$subject ="Soggetto;
$body .= "[b]Cognome[/b]: " . trim(stripslashes($_POST["cognome"])) . "
\n";
$body .= "[b]Nome[/b]: " . trim(stripslashes($_POST["nome"])) . "
\n";
$body = "
Scelte:\n\n
";
$body .= "[b]Telefono Pubblico[/b]: " . trim(stripslashes($_POST["scelta1"])) . "
\n";
$body .= "[b]Fax Pubblico[/b]: " . trim(stripslashes($_POST["scelta2"])) . "
\n";
$body .= "[b]wi-fi[/b]: " . trim(stripslashes($_POST["scelta3"])) . "
\n";
if (@mail($to, $subject, $body, $headers))
{
echo "la mail è stata inviata correttamente";
$headers = "Content-Type: text/html; charset= iso-8859-1\n\n";
$headers .= "From: MioSito <miamail@miamail.com>\r\n";
mail($_POST["mail"],$subject, $body, $headers);
}
else
{
echo "Si sono verificati dei problemi nell'invio della mail.
";
echo "[url='pop.html']riprova[/url]";
}
?>
mentre questo è il codice (semplificato) del file HTML:
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Documento senza titolo</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="mail.php">
Nome:
<input name="nome" type="text" id="nome" />
Cognome
<input name="nome2" type="text" id="nome2" />
Attrezzature Richieste:
Telefono Pubblico
<input name="scelta1" type="radio" value="si" />
sì
<input name="scelta1" type="radio" value="no" checked="checked" />
no
Fax Pubblico
<input name="scelta2" type="radio" value="si" />
sì
<input name="scelta2" type="radio" value="no" checked="checked" />
no
Wi-Fi
<input name="scelta3" type="radio" value="si" />
sì
<input name="scelta3" type="radio" value="no" checked="checked" />
no </p>
<input type="submit" name="Submit" value="Invia" />
<input type="reset" name="Submit2" value="Ripristina" />
</p>
</form>
</body>
</html>