Writing to a CSV file + security

Hello,

I’ve been asked to put something together where if a user fills in a form, some of their details are saved to a CSV file. It’s important that this information is secure so I was wondering what steps I should take. I can make the file write only which should help things along, I’m unaware of the server settings at the moment, but I’m hoping that SSL is available.

Do you think that this is enough, or would it be better to add the information to a database and create the CSV file dynamically when it’s required?

Cheers,

Jon

unless the csv file is required immediately after the form is submitted, then I think the database route is the better option.

also, when you generate the csv and depending who/what needs to access it, you could output it to a directory outside of the website’s domain. but in either case you need to make sure the permissions on the csv and the directory it is in are set appropriately.