Visualizzazione dei risultati da 1 a 3 su 3

Discussione: FormMail in PHP

  1. #1
    Utente di HTML.it
    Registrato dal
    Aug 2005
    Messaggi
    13

    FormMail in PHP

    nel mio sito uso un modulo in PHP che funziona bene.
    ora, vorrei solo arricchirlo di una funzione, quella i inviare una mail anche al visitatore del mio sito che ha compilato il modulo, con un contenuto preimpostato: Grazie di aver contattato NOMESITO, verrai ricontattato al più presto.

    Questo è il modulo:

    <?php
    $nome = $HTTP_POST_VARS['nome'];
    $mail = $HTTP_POST_VARS['mail'];
    $messaggio = $HTTP_POST_VARS['messaggio'];
    $nome = stripslashes($nome);
    $mail = stripslashes($mail);
    $messaggio = stripslashes($messaggio);
    // QUI DOVETE SOSTITUIRE L'INDIRIZZO EMAIL CON L'INDIRIZZO A CUI VOLETE INVIARE I DATI
    $rec_email = "mymail@mail.com";
    // QUI DOVETE SOSTITUIRE L'OGGETTO DELLA EMAIL CON IL VOSTRO OGGETTO
    $subject = "Contatto dal sito";
    $msg_body = "<html><head></head><body>";
    $msg_body = "<font face=\"Verdana\" size=\"2\">";
    $msg_body .= "Messaggio da: <a href=\"$SERVER_NAME\">$SERVER_NAME</a>
    ";
    $msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\">
    ";
    // NON RIMUOVETE O MODIFICATE QUESTA PARTE SOTTO!!!
    $msg_body .= "Nome: $nome
    ";
    $msg_body .= "Email: $mail
    ";
    $msg_body .= "Messaggio: $messaggio
    ";
    $msg_body .= "<hr width=\"100%\" size=\"1\" color=\"#333333\">
    ";
    $msg_body .= "</font></body></html>";
    $header_info = "MIME-Version: 1.0\r\n";
    $header_info .= "Content-type: text/html; charset=iso-8859-1\r\n";
    mail($rec_email, $subject, $msg_body, $header_info);
    ?>




    mi hanno proposto di inserire delle stringne di codice, ma non funziona più il modulo:

    //DA INSERIRE ALL'INIZIO
    $Today = date ("l dS of F Y");
    $reply = "Grazie di avere contattato MWeb design $Today, Riceverai presto una nostra risposta"

    //DA INSERIRE ALLA FINE
    mail($mail, "Re:"$subject, $reply, $header_info);


    GRAZIE A TUTTI

  2. #2
    DA INSERIRE ALL'INIZIO
    $reply = "Grazie di avere contattato MWeb design , Riceverai presto una nostra risposta"

    //DA INSERIRE ALLA FINE
    mail($mail, "Re:Grazie", $reply, $header_info);

    Prova così ...
    Nemus Loren
    www.freephp.tk

  3. #3
    Utente di HTML.it
    Registrato dal
    Aug 2005
    Messaggi
    13

    non funziona...

    niente, non va...
    ho vistato il tuo sito e ho visto che hai due formail in php nei downloads: il primo risulta mancante:Errore 404 .

    fammi sapere se hai dei formmail che fanno al caso mio, o conosci qualche risorsa free sul web

    intanto io vedo su html.it

    grazie ancora!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.