when i add an entry to my guestbook instead of listing them it is overwriting my current entry so instead of having all the entries its only displaying the one newest entry.
i have tried alot. but nothing has worked i have posted the code below, if any1 can see anything wrong please help
thanx
<?php
ob_start();
$name = $_POST['name'];
$email = $_POST['email'];
$homepage = $_POST['homepage'];
$location = $_POST['location'];
$message = $_POST['message'];
$date = gmdate("H:i, jS F");
$outputstring = "<p><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\">Name:</font> <a href=mailto:$email>".$name."</a>\n<br><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\">Date:</font> ".$date."\n";
if ($location)
$outputstring .="<br><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\">Location:</font> ".$location."\n";
if ($homepage)
$outputstring .= "<br><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\">Homepage:</font> <a href=$homepage>".$homepage."</a>\n</p>";
$outputstring .= "<p>".$message."\n\n</p><hr>";
@ $fp = fopen("list.txt", "r+");
flock($fp, 2);
if (!$fp)
{
echo "<p><strong> Your Addition to the Guestbook could not be processed at this time. "
."Please try again in a few minutes.</strong></p></body></html>";
exit;
}
fwrite($fp, $outputstring);
flock($fp, 3);
fclose($fp);
ob_end_clean();
header('location: guestbook.php');
die(' ');
?>