If you have a database already available, using it would be best, but you will need to make sure PHP was configured for access to the database. Or you could use ODBC to connect.
Using a text file would be interesting, but if it's not a high-volume situation, you might consider using DBM files. (Read the manual for how to use them)
However, with 5000 people taking the survey, you'd probably be better off using a database, since that will handle the concurrency issues you could potentially have. That is, if one is trying to write some data and another is trying to read the data, especially if you are using a common set of counters, you are going to have problems. 🙂 Also, if you are thinking of writing one file per person for their survey responses, well, think twice about that.
My experience has shown that when a set of data is written to files on disk (in your case, you might have 5000 of them) analysis of the data because a royal pain in the #&!#@!. Besides, you're collecting all this information, you're going to want to DO something with it afterwards, right?
My personal recommendation would be to use a database. 🙂 Anyone else have another suggestion? 🙂
--Joel