# Writing to a .txt file with a form

**URL:** <https://forum.kirupa.com/t/writing-to-a-txt-file-with-a-form/83420>\
**Category:** programming\
**Created:** [March 18, 2005, 6:00pm UTC](https://forum.kirupa.com/t/writing-to-a-txt-file-with-a-form/83420 "2005-03-18T18:00:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaveMania](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@DaveMania](https://forum.kirupa.com/u/DaveMania)\
**Post date:** [March 18, 2005, 6:00pm UTC](https://forum.kirupa.com/t/writing-to-a-txt-file-with-a-form/83420/1 "2005-03-18T18:00:25Z")

</div>

Is there a simple way of writing some basic text to a .txt file using a form.  
all i need in the form is to have a few different fields and that’s about it.  
Also is there a way of posting it to the first line/before the first line of the document?

Basically all i want is to have a text file that ends up like this

Header1|content1|footer1  
Header2|content2|footer2

and then using the form do this

New header|new content|new footer  
Header1|content1|footer1  
Header2|content2|footer2

can it be done?
