To delete the contents of a text file try: [code] <?php if ( isset ( $_POST['submit'] ) ) { $file = "whatever.txt"; $fp = fopen( $file, "w" ); if ( fwrite ( $fp, "" ) ) { print "The file $file has been erased!"; } else { print "Writing to the file: $file has failed!"; } } ?> [/code] If you would like to overwrite the file, put text in the empty quotes in this line: [code] if ( fwrite ( $fp, "This will overwrite the text!" ) ) { [/code] Then replace that line with the other line of that code. As for updating text try doing this: [code] <?php if ( isset ( $_POST['submit'] ) ) { $file = "whatever.txt"; $fp = fopen( $file, "a" ); // added append which is what "a" means if ( fwrite ( $fp, "text1<br>text2<br>text3<br>text4<br>text5" ) ) { print "The file $file has been appended too!"; } else { print "Writing to the file: $file has failed!"; } } ?> [/code] -Dan M.