title: Inserting multiple checkboxes values to MySQL
body: <p>I'm coding a back-end of a blog which the poster should choose which category the post should be. </p>
  
  <p>I don't know what to do next, I only have this piece of code which gets all the checkbox(checked) value(es)</p>
  
  <p>php code</p>
  
  <pre><code> if(isset($_POST['category'])){
     $category = $_POST['category'];
     foreach ($category as $cat=&gt;$value) {
     echo $value;
  </code></pre>
  
  <p>html code</p>
  
  <pre><code>&lt;input type="checkbox" name="category[]" value="CategoryA"&gt; CategoryA 
          &lt;input type="checkbox" name="category[]" value="CategoryB"&gt; CategoryB
          &lt;input type="checkbox" name="category[]" value="CategoryC"&gt; CategoryC
  </code></pre>
  
  <p>I just wanted to know how can I insert the value(es) </p>