How to save a form?

do u guys have any ideas how to save a form variables? for example i have two input boxes which get name and email address from the user, how can i save them to a file so i can load that up later on? .txt file will be perfect for me. thanks