hi. im new to php, and ive some problems with the f* commands, hope you all can offer me some advice. basically the code goes like this:
<?
$filename = "guestbook.txt";
$guestbook = fopen($filename,"a+");
fwrite($guestbook,$name,5);
fwrite($guestbook,$entry,10);
while(!feof($guestbook)) {
$buffer = fgets($guestbook,4096);
echo "$buffer<br>";
}
fclose($guestbook);
?>
what ive been trying to do, is to append entries into the end of guestbook.txt.
ive tried to manually add the entries in, by using guestbook.php?name=name1&entry=entry1
however, if i do that, it will loop infinitely. it does not loop infinitely if i access only guestbook.php.
hope you all can point out the fwrite, fopen and fclose errors to me if there is. thanks