At the top, you'll probably want to do:
if ($save) {
a) $fp = fopen("./hello.txt", "w");
b) fwrite($fp, $textfield);
c) fclose($fp);
}
This will:
A) Open the file that you initially read, for "w" (write)
😎 fwrite writes to the file pointer ($fp) the text that is in the variable $textfield (you get the name of the variable from the form elements name)
C) finally, close the connection cause your done.
Some help:
http://www.php.net/fopen
http://www.php.net/fwrite
http://www.php.net/fclose
Hope that helps!
Chris King