Hi. I want to do a simple newspage, where you can write from another page to the page. I have done that successfully, but the newest message drops in at the bottom, I want the on the top. See www.gothem.net/skriv.php3 for the write page, and www.gothem.net/nyheter.php3 for the newspage. The code for the writepage is:
<?
if ($message)
{
$message = ereg_replace("\r\n\r\n", "\n<P>", $message);
$date = date("l, j M Y, H:i:s");
$message = "<tr><td><B>Skrivet av: $name </B> -- $date<P>
$message
<hr></td></tr>";
$fp = fopen (basename($PHP_SELF) . ".comment", "a");
fwrite ($fp, $message);
fclose ($fp);
}
?>
<FORM method="post">
<b>Namn:</b><BR><INPUT name="name" type="text" size="55"><BR>
<b>Nyheten:</b><BR><TEXTAREA name="message" rows=10 cols=55 wrap=virtual>
</TEXTAREA><BR>
<INPUT name="submit" type="submit" value="Posta Nyheten">
</FORM>
Merry Christmas!