title: Update datebase by php
body: <p>I want to update MySQL database by below code, but it doesn't work why?</p>
  
  <pre><code>&lt;?php
      mysql_connect("localhost","root","");
      mysql_select_db("timer");
      $update=$_COOKIE['name'];
      mysql_query("UPDATE user SET password='2' WHERE username=$update");
  ?&gt;
  </code></pre>