pls check and say... how to get a data from user to store in wordpad

Discussion in 'PHP' started by nawabsheriff, Jan 21, 2009.

  1. #1
    <?php
    $fh = fopen($_SESSION['kiol.txt'], 'a');
    $stringData=$_GET['timeperiod'];
    fwrite($fh,$stringData);
    echo"procesing";
    fclose($fh);
    ?>


    will this code help to store a data which is given by user in a form in a wordpad
     
    nawabsheriff, Jan 21, 2009 IP
  2. fatedesign

    fatedesign Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'd do something like,

    <?php
    $content = $_POST['userInput'];
    $fh1 = fopen("kiol.txt", 'w') or die("Error, can't open file");
    fwrite($fh1, $content);
    fclose($fh1);
    echo "<html><head></head><body><center><div align=\"center\">Processing</div></center></body></html>";
    ?>
     
    fatedesign, Jan 21, 2009 IP
  3. nawabsheriff

    nawabsheriff Banned

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thank you..

    Its working
     
    nawabsheriff, Jan 22, 2009 IP