Jump to content

Save textarea's text as a downloadable .txt file


phppaper

Recommended Posts

1. State save the text in some way.

2. Echo it out into the text area, and show button below it.

3. When button is clicked, call another file and access the state saved text data.  Use this to generate the downloadable file, and pass proper headers for download.

http://www.tizag.com/phpT/filecreate.php

Thanks! I get the idea, by looking at your URL:

 

$ourFileName = "testFile.txt";

$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");

fclose($ourFileHandle);

 

Where should I input the textarea's text?? I am not that good with this, please help!

 

1. State save the text in some way.

2. Echo it out into the text area, and show button below it.

3. When button is clicked, call another file and access the state saved text data.  Use this to generate the downloadable file, and pass proper headers for download.

http://www.tizag.com/phpT/filecreate.php

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.