title: What should be the best place to store user preferences in PHP: database or files?
body: <p>I am developing a website using PHP and I'd like to know if it is better to store user preferences (such as language, background image, and so on) in a database or in a text file outside the public_html folder (to prevent public access to the info). </p>
  
  <p>I ask this because I am worried about the time PHP takes to read a file and to send a query to the database, also it may slow down the database due the volume of queries sent by multiple users.</p>