Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    tapino alle prime , primissime armi , chiede aiuto

    Lodato chi mi vuole aiutare..
    Ho un form che invia allo script php questi pochi dati

    <body bgcolor="#00FF33">
    <table width="200" border="0" cellspacing="5" cellpadding="5">
    <form action="trim.php" method="post">
    <tr>
    <td align="center" colspan="2"><font face="Courier New, Courier, mono">Compila il form</font></td>

    </tr>
    <tr>
    <td>Nome</td>
    <td><input name="nome" type="text" size="20" maxlength="40"></td>
    </tr>
    <tr>
    <td>Cognome</td>
    <td><input name="cognome" type="text" size="20" maxlength="40"></td>
    </tr>
    <tr>
    <td>Email</td>
    <td><input name="email" type="text" size="20" maxlength="60"></td>
    </tr>
    <tr>
    <td>Commenti</td>
    <td><textarea name="commenti" cols="20" rows="8"></textarea></td>
    </tr>
    <tr>
    <td></td>
    <td><input type="submit" value="invia"></td>
    </tr>
    <tr>
    <td></td>
    <td><input name="reset" type="reset" value="reset"></td>
    </tr>

    </form>
    </table>

    </body>
    ma la pagina php continua a darmi questo risultato....

    Notice: Undefined variable: nome in c:\programmi\easyphp1-8\www\andrea_prove\stringhe\trim\trim.php on line 13

    Notice: Undefined variable: cognome in c:\programmi\easyphp1-8\www\andrea_prove\stringhe\trim\trim.php on line 14

    Notice: Undefined variable: email in c:\programmi\easyphp1-8\www\andrea_prove\stringhe\trim\trim.php on line 15

    Notice: Undefined variable: commenti in c:\programmi\easyphp1-8\www\andrea_prove\stringhe\trim\trim.php on line 16

    Notice: Undefined index: nome in c:\programmi\easyphp1-8\www\andrea_prove\stringhe\trim\trim.php on line 21

    Notice: Undefined index: cognome in c:\programmi\easyphp1-8\www\andrea_prove\stringhe\trim\trim.php on line 28

    Notice: Undefined index: email in c:\programmi\easyphp1-8\www\andrea_prove\stringhe\trim\trim.php on line 35

    Notice: Undefined index: commenti in c:\programmi\easyphp1-8\www\andrea_prove\stringhe\trim\trim.php on line 42

    QUESTO E' IL CODICE DELLA PAGINA PHP CHIAMATA TRIM

    <script language="php">
    //con la funzione trim garantisco che non ci siano spazi all'inizio
    //e alla fine della stringa che arriva , ma non in mezzo....
    $nome=trim($nome);
    $cognome=trim($cognome);
    $email=trim($email);
    $commenti=trim($commenti);
    </script>
    <tr>
    <td align="center">
    <script language="php">
    print $HTTP_POST_VARS["nome"];
    </script>
    </td>
    </tr>
    <tr>
    <td align="center">
    <script language="php">
    print $HTTP_POST_VARS["cognome"];
    </script>
    </td>
    </tr>
    <tr>
    <td align="center">
    <script language="php">
    print $HTTP_POST_VARS["email"];
    </script>
    </td>
    </tr>
    <tr>
    <td align="center">
    <script language="php">
    print $HTTP_POST_VARS["commenti"];
    </script>
    </td>
    </tr>
    </table>

    Porca miseria non troov soluzione....non ridete !

  2. #2
    Utente di HTML.it L'avatar di marco80
    Registrato dal
    May 2005
    Messaggi
    1,357
    hai provato a mettere solo rint $_POST["nome"]; ??

  3. #3
    Il titolo non è a norma di regolamento

    http://forum.html.it/forum/showthrea...hreadid=412253
    Addio Aldo, amico mio... [03/12/70 - 16/08/03]

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.