Thanks! I should have thought of that, but I sure didn't!
Anyway, so far so good, I'm not getting all the fields to write to the text file, but it's looking good:
http://www.atimealone.com/php/news/newstest.php
edit:
aha, I had the wrong field in there a couple places, ok now, and here is the final script (including the input form):
<form action="http://www.atimealone.com/php/news/newstest.php" method="post" />
<table style="text-align:center;border:0;">
<tr><td class="g"><b>Name:</b></td>
<td class="g"><input type="text" name="user" size="40" value="Name" onfocus="if(this.value=='Name')this.value='';" onblur="if(this.value=='')this.value='Name';" /></td></tr>
<tr><td class="g"><b>Email:</b></td>
<td class="g"><input type="text" name="email" size="40" value="email" onfocus="if(this.value=='email')this.value='';" onblur="if(this.value=='')this.value='email';" /></td></tr>
<tr><td class="g" valign="top"><b>News:</b></td>
<td class="g"><textarea name="news" cols="40" rows="2">News Test</textarea></td></tr>
<tr><th colspan="2"><p><input type="submit" value="Add News" /> <input type="reset" value="Clear" /></p></th></tr>
</table>
<?php
if ($_SERVER[REQUEST_METHOD]=="POST")
{
extract($_REQUEST);
//stripslashes and replace url with link
$news = stripslashes(ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
"<a href=\"\\0\">\\0</a>", $news));
$date_format = date("l F j, Y, h:i:s A");
$endline = "\n\n";
$news1 = "<p class='f'><i>News for:</i> " . $date_format . " [posted by <a href='mailto:" . $email . "'>" . $user . "</a>]</p><p class='g'>" . $news . "</p><p class='center'><img src='http://www.atimealone.com/images/line.gif' width='379' height='6' alt='line.gif' /></p>".$endline;
$filename = "news.txt";
$handle = fopen($filename, "r");
$old_content = fread($handle, filesize ($filename));
$handle = null;
$final_content = $news1.$old_content;
$handle2 = fopen($filename, "w");
$finalwrite = fwrite($handle2, $final_content);
$handle2 = null;
}
include("news.txt");
?>