Pagina 1 di 3 1 2 3 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 21

Discussione: Form Su Flash

  1. #1

    Form Su Flash

    Ciao a tutti , avrei un piccolo problema con un form che ho aggiunto in un sito in .fla

    in pratica ho fatto 2 file :

    il 1° che si chiama contatti.php con all'interno il seguente codice

    <form name="form1" method="post" action="mail.php">
    <table width="95%" align="center" >
    <tr>
    <td colspan="2"><div align="center">MODULO CONTATTI </div></td>
    </tr>
    <tr>
    <td width="16%">Nome</td>
    <td width="84%"><input type="text" name="nome"></td>
    </tr>
    <tr>
    <td>Cognome</td>
    <td><input type="text" name="cognome"></td>
    </tr>
    <tr>
    <td>Citt&agrave; </td>
    <td><input type="text" name="citta"></td>
    </tr>
    <tr>
    <td>Indirizzo E-mail </td>
    <td><input type="text" name="mail"></td>
    </tr>
    <tr>
    <td>Oggetto</td>
    <td><input type="text" name="oggetto"></td>
    </tr>
    <tr>
    <td>Testo</td>
    <td><textarea name="testo" cols="40" rows="10"></textarea></td>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td colspan="2"><div align="center">
    <input type="submit" name="Submit" value="Invia">
    </div></td>
    </tr>
    </table>
    </form>

    mentre nel 2° file sempre in php che si chiama mail.php c'è il seguente codice :

    <?php
    // L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
    $to = "sitecostruction@live.it";

    // IL SOGGETTO DELLA MAIL
    $subject = "Modulo proveniente dal sito www.tis-consulting.com";

    // COSTRUZIONE DEL CORPO DEL MESSAGGIO
    $body = "Contenuto del modulo:\n\n";

    $body .= "Dati personali ;
    nome: " . trim(stripslashes($_POST["nome"])) . "\n";
    $body .= "cognome: " . trim(stripslashes($_POST["cognome"])) . "\n";
    $body .= "Città: " . trim(stripslashes($_POST["citta"])) . "\n";
    $body .= "Oggetto: " . trim(stripslashes($_POST["oggetto"])) . "\n";
    $body .= "testo: " . trim(stripslashes($_POST["testo"])) . "\n";
    $body .= "mail: " . trim(stripslashes($_POST["mail"])) . "\n";

    // INTESTAZIONI SUPPLEMENTARI
    $headers = "From: Modulo utenti www.tis-consulting.com";

    // INVIO DELLA MAIL
    if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE...

    echo "La mail è stata inoltrata con successo.";

    } else {// ALTRIMENTI...

    echo "Si sono verificati dei problemi nell'invio della mail.";

    }

    ?>

    ma quando inserisco i dati per fare una prova dell'invio dell' email mi dice

    Si sono verificati dei problemi nell'invio della mail e non capisco come mai , visto che sono 3 giorni che sto diventando pazzo ..... spero che possiate aiutarmi
    grazie

  2. #2
    Moderatore di PHP L'avatar di Alhazred
    Registrato dal
    Oct 2003
    Messaggi
    12,503
    Togli @ davanti alla funzione mail e vedi che messaggio d'errore esce, così è impossibile indicarti il problema.

  3. #3
    <?php
    // L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
    $to = "sitecostruction@live.it";

    // IL SOGGETTO DELLA MAIL
    $subject = "Modulo proveniente dal sito www.tis-consulting.com";

    // COSTRUZIONE DEL CORPO DEL MESSAGGIO
    $body = "Contenuto del modulo:\n\n";

    $body .= "Dati personali ;
    nome: " . trim(stripslashes($_POST["nome"])) . "\n";
    $body .= "cognome: " . trim(stripslashes($_POST["cognome"])) . "\n";
    $body .= "Città: " . trim(stripslashes($_POST["citta"])) . "\n";
    $body .= "Oggetto: " . trim(stripslashes($_POST["oggetto"])) . "\n";
    $body .= "testo: " . trim(stripslashes($_POST["testo"])) . "\n";
    $body .= "mail: " . trim(stripslashes($_POST["mail"])) . "\n";

    // INTESTAZIONI SUPPLEMENTARI
    $headers = "From: Modulo utenti www.tis-consulting.com";

    // INVIO DELLA MAIL
    if(mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE...

    echo "La mail è stata inoltrata con successo.";

    } else {// ALTRIMENTI...

    echo "Si sono verificati dei problemi nell'invio della mail.";

    }

    ?>


    come vedi ho tolto la @ dalla funzione mail , ma mi dice sempre : Si sono verificati dei problemi nell'invio della mail senza specificarmi l'errore


  4. #4
    cmq le prove le sto facendo qui a questo sito , prima di rovinare qualcosa a quello ufficiale

    http://www.hyperion-irc.it/SiTi/T.I.S./home.html

  5. #5
    Il problema credo sia dovuto dall'indicazione non corretta dell'header... così a prima vista mi cado l'occhio su quella variabile...

  6. #6
    niente da fare , ho provato a togliere anche la "s" da header , ma non ho risolto ancora il problema , continua a dirmi che ci sono problemi sull'invio della email ....

  7. #7
    metti un bel

    error_reporting(E_ALL);

    all'inizio

  8. #8
    SCUSA LA MIA IGNORANZA , MA LO METTO SU CONTATTI O SI MAIL.PHP , mi fai un piccolo esempio please

  9. #9
    Moderatore di PHP L'avatar di Alhazred
    Registrato dal
    Oct 2003
    Messaggi
    12,503
    Devi mettere quella riga all'inizio del file mail.php

  10. #10
    ho messo cosi nel file mail.php se è corretto ma non mi dice il tipo di errore:

    <?php

    error_reporting(E_ALL);

    // L'INDIRIZZO DEL DESTINATARIO DELLA MAIL
    $to = "sitecostruction@live.it";

    // IL SOGGETTO DELLA MAIL
    $subject = "Modulo proveniente dal sito www.tis-consulting.com";

    // COSTRUZIONE DEL CORPO DEL MESSAGGIO
    $body = "Contenuto del modulo:\n\n";

    $body .= "Dati personali ;
    nome: " . trim(stripslashes($_POST["nome"])) . "\n";
    $body .= "cognome: " . trim(stripslashes($_POST["cognome"])) . "\n";
    $body .= "Città: " . trim(stripslashes($_POST["citta"])) . "\n";
    $body .= "Oggetto: " . trim(stripslashes($_POST["oggetto"])) . "\n";
    $body .= "testo: " . trim(stripslashes($_POST["testo"])) . "\n";
    $body .= "mail: " . trim(stripslashes($_POST["mail"])) . "\n";

    // INTESTAZIONI SUPPLEMENTARI
    $header = "From: Modulo utenti www.tis-consulting.com";

    // INVIO DELLA MAIL
    if(@mail($to, $subject, $body, $header)) { // SE L'INOLTRO E' ANDATO A BUON FINE...

    echo "La mail è stata inoltrata con successo.";

    } else {// ALTRIMENTI...

    echo "Si sono verificati dei problemi nell'invio della mail.";

    }

    ?>

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.