I have a user input section on my site and i have a sort of guestbook, but when people submit things they always end up at the bottom of the page, (the newest submits at the bottom) how can i make the newest posts be at the top?? here is my code if it helps:
<head>
<title>Le Garagiste - News Updater</title>
<LINK REL="stylesheet" TYPE="text/css" HREF="include/legstyle.css">
<font class="datecount" size="2">
<p>
<?php
// Written by Maxwell Scott - Slade. Copyright 2001.
// Variables.
$date = HTMLSpecialChars($date);
$subject = HTMLSpecialChars($subject);
$log_file = "include/newsmsg.inc";
// if crap
if ($date == "")
{
echo "The form was not filled in correctly, please try again.";
exit;
}
elseif ($subject == "")
{
echo "The subject field was not filled in correctly, please try again.";
exit;
}
elseif ($message == "")
{
echo "The message field was not filled in correctly, please try again.";
exit;
}
else
{
echo "The news section has been updated succesfully.";
}
// Whats written to the file.
$to_log = "
<font class=\"datecount\" size=2>
<p>$posttype - $subject</p>
<p>$message</p>
<p>Posted on: $date</p>
</font>
<br>
<hr>
";
// Write the contents to the file.
$fp = fopen($log_file, "a");
$fw = fwrite($fp, $to_log);
fclose($fp);
?>
</head>
Please try and help me, Max Slade