I'm sorry. Maybe I schould have told more about the site. When it writes a new message it opens the file, contaning the messages.
To make it easyer, this is the code for the page:
if ($message)
{
$name = strip_tags($name);
$mailaddy = strip_tags($mailaddy);
$message = strip_tags($message,"<a>,<b>,<i>,<p>,<br>");
if (get_magic_quotes_gpc())
{
$message = stripslashes($message);
$name = stripslashes($name);
$mailaddy = stripslashes($mailaddy);
}
$message = ereg_replace("\r\n\r\n", "\n<P>", $message);
$date = date("l, F j Y, h:i a");
$message = "<B>$name </B> -- $date<P> $message <BR><HR>\n";
$fp = fopen (basename($PHP_SELF) . ".comment", "a");
fwrite ($fp, $message );
fclose ($fp);
mail("stalle@tstalle.dk", "Besked på www.tstalle.dk", $message, "From: $mailaddy");
}
// the @ suppresses errors if the file is missing
@readfile(basename(($PHP_SELF . ".comment")));
?>
My problem is, where do i put in the ORDER BY, and will it in fact work in this case?
Just to finish off, i proberly should tell you, that this is the first PHP i've ever made.
Hope you can help me
/Torben