Citazione:
<form name="send_form" method="post" action="MIOSCRIPT.php">
<input name="sender_mail" type="text" id="sender_mail" value="Tuo indirizzo mail">
<input name="subject" type="text" id="subject" value="Soggetto della mail">
<textarea name="message_txt" cols="23" rows="7" wrap="VIRTUAL" id="testo">Messaggio
</textarea>
<br>
<input type="submit" name="Submit" value="Invia">
</form>
MIOSCRIPT.php (file php che dovrai creare separatamente...)
Citazione:
<?php
$destinatario = "TUOINDIRIZZOMAIL" ;
$sender_mail = $_POST['sender_mail'];
$subject = $_POST['subject'];
$testo_ricevuto = $_POST['message_txt'];
$testo = stripslashes($testo_ricevuto);
$ip = $_SERVER['REMOTE_ADDR'] ;
$data = date("d/m/Y");
$browser = $_SERVER["HTTP_USER_AGENT"] ;
$message = "Hai appenta ricevuto un messaggio dal tuo form di contatti on-line
IP : $ip ;
Data: $data
Browser = $browser ;
Mittente: $sender_mail ;
Contenuto: $testo ;
" ;
mail($destinatario, $subject, $message);
print"<html>
<head>
<title>Invio riuscito</title>
</head>
<body>
<p>MESSAGGIO DA MOSTRARE DOPO L'INVIO!.</p>
</body>
</html>";
?>
Ti garantisco che funziona anche perchè lo uso io nel mio sito... chiaramente devi verificare che nel form HTML l'indirizzo dello script php sia indicato correttamente. In altre parole devi posizionare MIOSCRIPT.php nella stessa directory del file HTML