Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 12
  1. #1

    passare valori text area

    sera a Voi,
    sarò breve..

    codice:
    <FORM METHOD="POST" ACTION="nuovofile.php">
    <TEXTAREA NAME="Testo1" COLS="45" ROWS="5"></TEXTAREA>
    <INPUT TYPE="submit" NAME="Invia" VALUE="Clicca Qui">
    </FORM>
    il file php:

    Codice PHP:
    <?
    $nomefile
    ="./mionome.txt";
    $nuovofile=fopen($nomefile,"w+")
    or die(
    " Impossibile creare il file");
    echo 
    $_POST['$Testo1'];
    fclose($nuovofile);
    $msg="file creato";
    ?>
    devo scrivere dentro il txt..
    ma non funge!!
    sera a tutti e grazie!
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  2. #2
    Utente di HTML.it L'avatar di Avalox
    Registrato dal
    Nov 2003
    Messaggi
    302
    Non funge perchè
    echo $_POST['$Testo1'];
    non scrive il txt dentro al file

    Prova a spulciare il manuale
    http://it2.php.net/manual/it/function.fwrite.php

    ByeZ

  3. #3
    bhe... echo stampa solo codice html.. per scrive su un file si usa fwrite...

    Codice PHP:
    fwrite($nuovofile,$_POST['testo1']); 
    ciao

  4. #4
    Originariamente inviato da camicio109
    bhe... echo stampa solo codice html.. per scrive su un file si usa fwrite...

    Codice PHP:
    fwrite($nuovofile,$_POST['testo1']); 
    ciao
    qualcosa non va pare..
    ----> Undefined index: testo1
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  5. #5
    ciao webbeloz, il tuo avatar continua a nn piacermi :tongue: :

    <?php
    $nuovofile = $text."./mionome.txt";
    $fp = fopen ($nuovofile,"w+");
    fwrite($fp, $_POST ['Testo1'] );
    fclose($fp);
    ?>

    se nel file txt vuoi avere una variabile "miavariabile="
    <?php
    $nuovofile = $text."./mionome.txt";
    $fp = fopen ($nuovofile,"w+");
    fwrite($fp, "miavariabile=".stripslashes ($_POST ['Testo1']) );
    fclose($fp);
    ?>


  6. #6
    Originariamente inviato da alempas
    ciao webbeloz, il tuo avatar continua a nn piacermi :tongue: :

    <?php
    $nuovofile = $text."./mionome.txt";
    $fp = fopen ($nuovofile,"w+");
    fwrite($fp, $_POST ['Testo1'] );
    fclose($fp);
    ?>

    se nel file txt vuoi avere una variabile "miavariabile="
    <?php
    $nuovofile = $text."./mionome.txt";
    $fp = fopen ($nuovofile,"w+");
    fwrite($fp, "miavariabile=".stripslashes ($_POST ['Testo1']) );
    fclose($fp);
    ?>

    ah non ti piace..

    cmq non vààààà!!
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  7. #7
    ola'la'... :master: .....
    io lo utilizzo inviando informazioni da flash, e funziona perfettamente... quindi per esclusione penso che l'errore sta nel pulsante invia (in html), evidentemente il codice html nn considera "testo1" come variabile (penso!!! nn sono pratico con l'html)

    vedi un po'

  8. #8

  9. #9
    tutto apposto..
    ho cambiato totalmente


    ciaooo
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  10. #10
    e come??? sempre con html???

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 © 2024 vBulletin Solutions, Inc. All rights reserved.