Codice PHP:
<?php
////////// VARIABILI //////////
$webmaster= "info@sito.it";
$thanks= "grazie.php";
////////// FINE VARIABILI //////////
///////// CONTROLLO CAMPI //////////
////////// FINE CONTROLLO CAMPI //////////
$messaggio=$_POST["messaggio"];
$Nome =$_POST["Nome"];
$Cognome=$_POST["Cognome"];
$Indirizzo=$_POST["Indirizzo"];
$Ditta=$_POST["Ditta"];
$Citta=$_POST["Citta"];
$Telefono=$_POST["Telefono"];
$Email=$_POST["Email"];
$Richiesta=$_POST["Richiesta"];
$messaggio=nl2br($messaggio);
$data= date("D j-m-Y");
$ora= date("H:i");
$testo= stripslashes("
Nome: $Nome
Cognome: $Cognome
Indirizzo: $Indirizzo
Ditta:$Ditta
Citta: $Citta
Telefono: $Telefono
E-mail: $Email
Messaggio: $Richiesta
---------
Inviato il: $data alle ore $ora
Indirizzo IP: $REMOTE_ADDR
");
mail($webmaster, "Nuovo messaggio dalla Posta del sito", $testo, "From: Form Mail");
Header("Location: $thanks");
?>