tomi commented on a Page, Simple GuestBook  -  Jan 22, 2013

how to make the most recent post appearing first ?

F*U*R*B*Y*  -  Jan 27, 2013

on line 57 you have

$fp = fopen($file,"a");

change that to

$fp = fopen($file,"x");

and it should fix it! (I believe!)

tomi  -  Feb 03, 2013

I've changed but i get an error
Warning: fopen(guestbook.txt) [function.fopen]: failed to open stream: File exists in /home/...
Warning: fwrite(): supplied argument is not a valid stream resource in /home/...
Warning: fclose(): supplied argument is not a valid stream resource in /home/...

F*U*R*B*Y*  -  Feb 04, 2013

have you created the file?

mc_peko  -  Apr 01, 2013

I too very much need the last entry on top. I've set this up as a beta. And will try to add some security. E-mail validation, and perhaps a captcha, to avoid spam. Also I think separate pages when messages exceed , say 20, is something we must have. But I'd like to stop right about there, to keep it simple. Help very much appreciated. Thanks a lot to you coders.

mc_peko  -  Apr 01, 2013

Check http://www.php.net/manual/en/function.fopen.php

$fp = fopen($file,"c");

might work.

But not for me yet. :(

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.