- This topic is empty.
Viewing 1 post (of 1 total)
-
AuthorPosts
-
November 18, 2014 at 9:48 am #188614giovannicrazyParticipant
Hi everyone, I have a little problem with a contact form, when someone send the data I get all the data except the e-mail.
I tried to find a solution, I hope that you can help me.
This is the full php code:<?php echo "Resoconto modulo inviato <br>", "<br>"; echo "Name: " . trim(stripslashes($_POST["nome"])) . "<br>"; echo "Surname: " . trim(stripslashes($_POST["cognome"])) . "<br>"; echo "Message: ". trim(stripslashes($_POST["testo"])) . "<br>"; echo "E-mail: " . trim(stripslashes($_POST["email"])) . "<br>"; echo "<br>"; echo "<br>"; echo "Riceverai al più presto una risposta via E-mail all'indirizzo " . trim(stripslashes($_POST["email"])) . "<br>"; echo "<br>"; echo "<br>"; ?> <?php // email address $to = "[email protected]"; // IL SOGGETTO DELLA MAIL $subject = "Modulo di contatto Errea Edizioni"; // message $body = "Contenuto del modulo:\n\n"; $body .= "Dati personali ; Name: " . trim(stripslashes($_POST["nome"])) . "\n"; $body .= "Surname: " . trim(stripslashes($_POST["cognome"])) . "\n"; $body .= "E-mail: " . trim(stripslashes($_POST["email"])) . "\n"; $body .= "testo: " . trim(stripslashes($_POST["testo"])) . "\n"; // INTESTAZIONI SUPPLEMENTARI $headers = "From: Contattaci di www.example.com"; // INVIO DELLA MAIL if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE... echo "<a href=\"../index.html\">L'email è stata inviata clicca per tornare alla pagina Principale</a>"; } else {// ALTRIMENTI... echo "<a href=\"../index.html\">L'email non è stata inviata a causa di problemi; riprovate in seguito !!! Clicca per tornare alla pagina Principale</a>"; } ?>
-
AuthorPosts
Viewing 1 post (of 1 total)
- The forum ‘Back End’ is closed to new topics and replies.