Thanks bradgrafelman ,
So ive made a form that uses the code below to collect the new content and send it to my news.txt file. Then im using Supernovas code to display that file on my news webpage. Ive also found a little wysiwyg browser editor to format my text area into html. So im getting there ... a a confused roundabout way.(I'm not even sure where this code came from - i kind of cobbled it together with blind luck, a php book and plagiarism!)
<?php
$filename = 'news.txt';
$content = "$comments";
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'a')) {
echo "Cannot open file ($filename)";
exit;
}
// Write $content to our opened file.
if (fwrite($handle, $content) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "You have successfully written \"$content\" to the news page";
fclose($handle);
} else {
echo "The file $filename is not writable";
}
?>
However. All this code does is add to the file, when i really would like to overwrite it. How would i do this?