Writing a guestbook from scratch is a really fun project! I like the simplicity of your implementation!

In my personal guestbook, I ended up creating a moderation front-end which ended up needing password protection and session cookie management and a real database. It was a good time, but just writing to a text file would have made things easier for sure. I also ended up needing to implement spam prevention because bots started finding my site and attempting to advertise in my guestbook.

It was easy enough to stop spammers by including a field hidden by CSS that if filled rejects the POST request fortunately. I haven't had any since implementing that.