title: Preset the values of a form with data from a database
body: <p>I have a form in a web (build with html). Let's say that I have some values for the form that can change, so I store them in a database. What I want to do is that everytime that an user goes to the page where the form is, the data from the database has to be read and the form has to be filled with that information (For example, I have a field for an e-mail, so I want to fill it with the e-mail I have in the database).</p>
  
  <p>I've been looking for a way to do this, but I have not found any that I really "like". The only way I can do it is by doing an AJAX request on javascript to a PHP script, where I connect to the DB and get the data. Once I get it, I modify the whole form via Javascript, but I'm not really sure if it is safe enough.</p>
  
  <p>Any ideas of how to do it in a different way or how to do it safely enough?</p>
  
  <p>Thank you very much.</p>