Jump to content

Bounty

Members
  • Posts

    78
  • Joined

  • Last visited

    Never

Posts posted by Bounty

  1. Hello...im trying to make a script that will add a input text field to my page and a submit button witch would save all data in the textfield as "somename.txt"...this is all i could get can you help me out here? :/

     

     

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    
    <body>
    <table align="center">
      <tr>
        <td> <textarea name="textfield" cols="45" rows="5" id="textfield">Text</textarea></td>
      </tr>
      <tr>
        <td align="center"> <input name="submit" type="submit" id="button" value="Submit" onClick=""></td>
      </tr>
    </table>
    </body>
    <?php
    $myFile = "testFile.txt";
    $fh = fopen($myFile, 'w') or die("can't open file");
    $stringData = "blahhh";
    fwrite($fh, $stringData);
    fclose($fh);
    ?>
    
    </html>
    

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.