How would I do this kind of form? (questions and collecting information)

I need to make a form that collects data from userinput divided into four different pages. Like the first page has one question, the next one, and so fort. I also need to store the information in some database or something rather than sending an email.

It is a website where the visitor answers a couple of questions and by doing so participates in a contest. And I have no idea how to do this.

So: ONE form divided on a number of pages, and a smart way to collect and store the input on each person who answers the questions.