title: Why are VALUES written between quotes when sent to a database?
body: <p>I am not entirely sure if I should post it on here or not since it does not contain any real coding, but I have been thinking about it for a long time and no one could really give me a good answer (from the people of I have been asking / the research done). I have been taught to write (when inserting something into the DB) to write:</p>
  
  <pre><code>$sql = "INSERT INTO usertimes (name,date,amount,times)
  VALUES ('$name', CURDATE(), '$amount', '$times') ON DUPLICATE KEY UPDATE    
  date=CURDATE(), amount='$amount', times='$times'"; 
  </code></pre>
  
  <p>This is just an example however, but I have been wondering; Why are there quotes around the variable names? Don't these variables remain variables technically speaking? I did some research as mentioned before, but that doesn't really explain why we do so, I just find stuff related to this: <a href="https://stackoverflow.com/questions/26349613/add-quotes-around-variable">Add quotes around variable</a>
  My apologies if it's a newb question and-or if it shouldn't be posted here. I'm just curious why we do so since from the start we learn a variable shouldn't have quotes around it or you will litterly take over the quote (for example: you would see $times instead of the value given to $times).</p>
  
  <p>Cheers!</p>