Here's the code. Look up the functions at php.net for more explanation:
-- form.php --
<?
// include path w/filename here if necessary
$filename = "textfile.txt";
$fp = fopen ($filename, "rw");
echo "<form method=post action=process.php>\n";
echo "<textarea rows='6' cols='40' name='content'>\n";
$content = fread ($fp, filesize ($filename));
echo $content;
echo "</textarea><br><br>";
fclose ($fp);
echo "<input type=submit value=Submit>\n";
echo "</form>";
?>
-- process.php --
<?
$filename = "file.txt";
$fp = fopen ($filename, "w");
// write to file
if (!fwrite($fp, $_POST['content'])) {
echo "Could Not Write to file";
exit;
}
echo "Information Written Successfully";
fclose($fp);
?>
Cgraz