Visualizzazione risultati 1 fino 5 di 5

Discussione: [PHP] Errore tag php

  1. #1
    Guest

    Predefinito [PHP] Errore tag php

    salve ragazzi ho un problemone
    in questo script i tag php si confondo cioè lo script me lo chide prima con un' altro tag php
    come posso risolvere?
    Codice PHP:
    <?php
    $email_destinatario
    = .$_POST['mail'].; //modificare con il destinatario
    $email_mittente = .$_POST['mail'].; //modificare con il mittente
    $titolo = "Invito per ****"; //titolo
    $messaggio = "<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <
    head>

    <
    meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
    <
    title>email.html</title>


    </
    head>
    <
    body>

    <
    table style="border: 0pt none ; text-align: left; width: 1001px; height: 489px;" border="0" cellpadding="2" cellspacing="2">

    <
    tbody>

    <
    tr>

    <
    td><img style="width: 300px; height: 110px;" alt="****" src="http://****.altervista.org/loghi/logo.png"></td>

    <
    td>Ciao!! <?php echo"<b>".$_POST{['nome']."</b>"?> ti invita ad iscriverti a ****<a href="http://****.altervista.org">clicca qui per registrarti</a></td>

    <td></td>

    </tr>

    <tr>

    <td></td>

    <td>
    <h2 style="color: rgb(52, 134, 229);">Cos'&egrave; Zomer?</h2>


    <p><span style="color: rgb(240, 30, 175);">**** &egrave; un
    social network ma non solo <u>Totalmente Gratis</u>, nato dall'idea di alcuni ragazzi come voi.
    In **** puoi cercare vecchi amici, chattare con loro, iscriverti a
    gruppi, condividere, creare un album fotografico e molto altro</span>
    </p>

    <span style="text-decoration: underline;"></span>
    <table style="text-align: left; width: 419px; height: 128px;" border="0" cellpadding="2" cellspacing="2">

    <tbody>

    <tr>

    <td><img style="width: 50px; height: 50px;" alt="profilo" src="http://****.altervista.org/immagini/icone/profilo.png"></td>

    <td><img style="width: 50px; height: 50px;" alt="amici" src="http://****.altervista.org/immagini/icone/amici.png"></td>

    <td><img style="width: 50px; height: 50px;" alt="blog" src="http://zomer.altervista.org/immagini/icone/blog.png"></td>

    <td><img style="width: 50px; height: 50px;" alt="album" src="http://****.altervista.org/immagini/icone/album.png"></td>

    </tr>

    <tr>

    <td style="color: rgb(0, 128, 255);">Registrati e crea il tuo profilo!</td>

    <td style="color: rgb(255, 0, 0);">Aggiungi i tuoi amici chatta, condividi foto, Divertiti!</td>

    <td style="color: rgb(51, 204, 0);">Crea il tuo blog, modificalo, scrivi post, carica uno
    sfondo, partecipa a concorsi!</td>

    <td style="color: rgb(255, 102, 0);">Crea album fotografici carcando fino a 200 foto! </td>

    </tr>

    </tbody>
    </table>
    </td>

    <td></td>

    </tr>

    </tbody>
    </table>

    <br>

    <div style="text-align: center;"><small><small>Copyright Zomer 2010 - 2011</small></small></div>
    </body>
    </html>""; //messaggio HTML dell'email

    $headers = "MIME-Version: 1.0\r\n" ;
    $headers .= "Content-Type: text/html; charset=iso-8859-1\r\n";
    $headers .= "From: [staff@zomer.it] < ".$email_mittente.">\r\n"; //cambiare [nome mittente] con quello che desiderate!

    //invio l'email!

    if(@mail($email_destinatario, $titolo, $messaggio, $headers))
    echo "Email inviata correttamente!";
    else
    echo "Errore nell'invio dell'email!";

    ?>
    <form name="form1" method="post">
    <table width="95%" align="left" >
    <tr>
    <td colspan="2"><div align="center"><strong>MODULO INVITA AMICI</strong></div></td>
    </tr>
    <tr>
    <td width="16%"><strong>Nome</strong></td>
    <td width="84%"><input type="text" name="nome"></td>
    </tr>
    <tr>
    <td><strong>Tuo Indirizzo E-mail </strong></td>
    <td><input type="text" name="mail"></td>
    </tr>
    <tr>
    <td><strong>Oggetto</strong></td>
    <td><input type="text" name="oggetto"></td>
    </tr>
    <tr>
    <td><strong>Email Amici:</strong></td>
    <td><input type="text" name="amici"></td>
    </tr>
    <tr>
    <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
    <td colspan="2"><div align="left">
    <input type="submit" name="Submit" value="Invia">
    </div></td>
    </tr>
    </table>
    </form>
    Ultima modifica di sk1zzo : 11-09-2009 alle ore 18.12.39

  2. #2
    L'avatar di darkwolf
    darkwolf non è connesso Salvatore Noschese
    Data registrazione
    18-04-2007
    Residenza
    Reggiolo (RE)
    Messaggi
    6,558

    Predefinito

    È parecchio incasinato....
    Comunque, così dovrebbe andare
    Codice PHP:
    <?php
    $email_destinatario
    = $_POST['mail']; //modificare con il destinatario
    $email_mittente = $_POST['mail']; //modificare con il mittente
    $titolo = "Invito per ****"; //titolo
    $messaggio = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
    <html>
    <head>

    <meta content=\"text/html; charset=ISO-8859-1\" http-equiv=\"content-type\">
    <title>email.html</title>


    </head>
    <body>

    <table style=\"border: 0pt none ; text-align: left; width: 1001px; height: 489px;\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">

    <tbody>

    <tr>

    <td><img style=\"width: 300px; height: 110px;\" alt=\"****\" src=\"http://****.altervista.org/loghi/logo.png\"></td>

    <td>Ciao!! <b>"
    . $_POST['nome'] . "</b> ti invita ad iscriverti a ****<a href=\"http://****.altervista.org\">clicca qui per registrarti</a></td>

    <td></td>

    </tr>

    <tr>

    <td></td>

    <td>
    <h2 style=\"color: rgb(52, 134, 229);\">Cos'&egrave; Zomer?</h2>


    <p><span style=\"color: rgb(240, 30, 175);\">**** &egrave; un
    social network ma non solo <u>Totalmente Gratis</u>, nato dall'idea di alcuni ragazzi come voi.
    In **** puoi cercare vecchi amici, chattare con loro, iscriverti a
    gruppi, condividere, creare un album fotografico e molto altro</span>
    </p>

    <span style=\"text-decoration: underline;\"></span>
    <table style=\"text-align: left; width: 419px; height: 128px;\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">

    <tbody>

    <tr>

    <td><img style=\"width: 50px; height: 50px;\" alt=\"profilo\" src=\"http://****.altervista.org/immagini/icone/profilo.png\"></td>

    <td><img style=\"width: 50px; height: 50px;\" alt=\"amici\" src=\"http://****.altervista.org/immagini/icone/amici.png\"></td>

    <td><img style=\"width: 50px; height: 50px;\" alt=\"blog\" src=\"http://zomer.altervista.org/immagini/icone/blog.png\"></td>

    <td><img style=\"width: 50px; height: 50px;\" alt=\"album\" src=\"http://****.altervista.org/immagini/icone/album.png\"></td>

    </tr>

    <tr>

    <td style=\"color: rgb(0, 128, 255);\">Registrati e crea il tuo profilo!</td>

    <td style=\"color: rgb(255, 0, 0);\">Aggiungi i tuoi amici chatta, condividi foto, Divertiti!</td>

    <td style=\"color: rgb(51, 204, 0);\">Crea il tuo blog, modificalo, scrivi post, carica uno
    sfondo, partecipa a concorsi!</td>

    <td style=\"color: rgb(255, 102, 0);\">Crea album fotografici carcando fino a 200 foto! </td>

    </tr>

    </tbody>
    </table>
    </td>

    <td></td>

    </tr>

    </tbody>
    </table>

    <br>

    <div style=\"text-align: center;\"><small><small>Copyright Zomer 2010 - 2011</small></small></div>
    </body>
    </html>"
    ; //messaggio HTML dell'email

    $headers = "MIME-Version: 1.0\r\n" ;
    $headers .= "Content-Type: text/html; charset=iso-8859-1\r\n";
    $headers .= "From: [staff@zomer.it] < ".$email_mittente.">\r\n"; //cambiare [nome mittente] con quello che desiderate!

    //invio l'email!

    if(@mail($email_destinatario, $titolo, $messaggio, $headers))
    echo
    "Email inviata correttamente!";
    else
    echo
    "Errore nell'invio dell'email!";

    ?>
    <form name="form1" method="post">
    <table width="95%" align="left" >
    <tr>
    <td colspan="2"><div align="center"><strong>MODULO INVITA AMICI</strong></div></td>
    </tr>
    <tr>
    <td width="16%"><strong>Nome</strong></td>
    <td width="84%"><input type="text" name="nome"></td>
    </tr>
    <tr>
    <td><strong>Tuo Indirizzo E-mail </strong></td>
    <td><input type="text" name="mail"></td>
    </tr>
    <tr>
    <td><strong>Oggetto</strong></td>
    <td><input type="text" name="oggetto"></td>
    </tr>
    <tr>
    <td><strong>Email Amici:</strong></td>
    <td><input type="text" name="amici"></td>
    </tr>
    <tr>
    <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
    <td colspan="2"><div align="left">
    <input type="submit" name="Submit" value="Invia">
    </div></td>
    </tr>
    </table>
    </form>
    Ultima modifica di darkwolf : 11-09-2009 alle ore 18.35.25 Motivo: Piccola correzione ;)

  3. #3
    Guest

    Predefinito

    funziona ma
    ce scritto
    email inviata correttamente!
    anche se non hai ancora compilato i campi

  4. #4
    Guest

    Predefinito

    E mi sembra logico, esegui lo script senza nessuna condizione...
    Dovresti controllare che la variabile $_POST["Invia"] sia correttamente settata, se si invii l'email.

  5. #5
    Guest

    Predefinito

    come posso fare

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •