Salve,
sto utilizzando questo codice:
Codice PHP:
<html>
<head>
<title>Form to mail</title>
</head>
<body>
<center>
<?
if(!isset($_POST['submit']))
{
echo '<h1>Form to mail</h1>
<form method="post" action="#">
<h3>Destinatario:</h3> <input type="text" name="destinatario"/><br/>
<h3>Mittente:</h3><input type="text" name="mittente"/><br/>
<h3>Oggetto:</h3> <input type="text" name="oggetto"/><br/>
<h3>Testo:</h3><br/><textarea cols="20" rows="10"></textarea><br/>
<input type="submit"/>
</form>';
}
else
{
$to=@$_POST['destinatario'];
$from=@$_POST['mittente'];
$subject=@$_POST['oggetto'];
$mess=@$_POST['messaggio'];
$header="From: ".$from;
mail($to, $from, $subject, $mess, $header);
}
?>
</center>
</body>
</html>
Mi sapete dire cosa sto omettendo o sbagliando? proprio non funziona.