I have a form that a user fills out, with one text box. I want everything in that text box, which is sent as a variable to a php file, fully REPLACE the contents of a text file. In other words, I want the variable to edit the text file by erasing the contents of the file, and replacing it with the variable's contents. How would I do this? I know it involvse fopen() and fwrite() but I don't know how to code it.