Html text saving to text file?

I have a variable that is in a text file, which contains HTML that i load into my project and it displays it as html in a textbox…

Im trying to have a MC in there that I can change the html text and save it over the file thats already there…

and then next time i load it up, it will load the html text that i just created and saved to the file…

Could anyone help me out with this one?
Might just be a simple like php scripting or osmething that saves it to a txt file? i tried looking through the forum… but havent found anything that could help me yet… thanks in advance