Jump to content

govindJ

New Members
  • Posts

    3
  • Joined

  • Last visited

govindJ's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. file_put_contents() function is very handy :happy-04: Thanks!
  2. I am trying to create a program to get input from user in textarea and save that input into a text file. But this code is only creating an empty file. <?php echo <<<_END <form action="form.php" method="post"> <textarea name="textdata" cols="50" rows="20"></textarea> <input type="submit" name="submit" value="CLICK ME"> <input type="hidden" name="submit_check" value="1"> </form> _END; function write(){ $fname="test.txt"; $fh=fopen($fname,'w'); $data=$_POST['textdata']; fwrite($fname,$data); fclose($fh); } if(isset($_POST['submit_check'])){ write(); } ?> please help me. sorry for bad english
×
×
  • 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.