Php guestbook

Hi,

i’ve just found a php script for a guestbook and am having trouble editing it to look how i want, Here’s what i’ve got it to look like so far :

http://www.atreyuonline.com/guestbook/guestbook.php

And heres what i want it to look like, i don’t want that bit to happen with the ‘Added Post Successfully, View Guestbook’, just want it to refresh the page with the entry added…and i’d like the entries in the opposite order (newest to oldest)…heres the link for the visual (all links are dead, plus form)

http://www.atreyuonline.com/guestbook/prettyguestbook.php

This is my sign.php script…

<link href="../css/style.css" rel="stylesheet" type="text/css"> <?php

require "config.php";

if (
$_SERVER['REQUEST_METHOD'] == 'POST' ) {

            $name = $HTTP_POST_VARS['name'];
            $post = $HTTP_POST_VARS['post'];

            $post = strip_tags($post, $allowed_html_tags);
            $post = stripslashes($post);

            $time = date("F jS Y, h:iA");
            $ip = $REMOTE_ADDR;  

            if ($addtotop == "0" ) {

                         $fp = fopen("db/posts.php",  "a");  
                         fputs($fp, "<p><span class=\"post\"><b>" . $name . "</b><br><br>" . $post . "</span></p><p><span class=\"details\"><b>Time: </b>" . $time . "<br><b>IP:</b> $ip</span></p>");
                         fclose($fp);

            }

            if ($addtotop == "1" ) {

                         $att1 = "db/posts.php";
                         $att2 = fopen ($att1, "rb");
                         $currententries = fread ($att2, filesize ($att1));
                         fclose ($att2);

                         $fp = fopen("db/posts.php",  "w+");  
                         fputs($fp, "<p><span class=\"post\"><b>" . $name . "</b><br>" . $post . "</span></p><p><span class=\"details\"><b>Time: </b>" . $time . "<br><b>IP:</b> $ip</span></p>".$currententries);
                         fclose($fp);

            }

            echo "Added Post Sucessfully<br><a href=\"guestbook.php\">View Guestbook</a><br><br>";

} else {
require "templates/post_form.inc";
}

?>

and heres my view.php script…

<link href="../css/style.css" rel="stylesheet" type="text/css"> <?php

require "config.php";

include "db/posts.php";

include "sign.php";

?>

I really hope someone can help me. I’ve been trying to get a really good php guestbook for ages but i’m just not advanced enough to edit the scripts fully yet…

thanks!