title: How to UPDATE mysql using implode array
body: <p>I am working on a form with multiple checkboxes. the value of checkboxes is stored in the mysql database and and <code>INSERT</code> query is working fine when i try to update record with <code>UPDATE</code> query something went wrong i have this <code>index.php</code></p>
  
  <p>This is my insert query which is working fine</p>
  
  <pre><code>$hobi=implode(',',$_POST['hobi']);
  
  $db-&gt;query("INSERT INTO info (cekbox) VALUES('$hobi')");
  </code></pre>
  
  <p>And this is my update query which is not working means not updating records</p>
  
  <pre><code>$hobi=implode(',',$_POST['hobi']);
  
  //$db-&gt;query("INSERT INTO info (cekbox) VALUES('$hobi')");
  
  $db-&gt;query("UPDATE info (cekbox) WHERE id= '$id' SET VALUES ('$hobi') ");
  </code></pre>
  
  <p>Please tell me how to put implode array in update query?</p>