I'm thinking about writing some basic scripts that dont use MySQL databases, like guestbooks, mailing lists etc.

Now maybe I'm just lazy, and haven't looked hard enough in the PHP documentation, but how to you write to a file? if you dont know what i mean here is an example:

Someone enters all the info for a guestbook and hits the submit button, it then goes on the guestbook entries page for all to see.

Ok, so how do I do that? And can i write to a .txt file and then have it to pull the info from the file?

I feel really silly asking this but once I know this the rest will be a breeze.