title: How to store multiple checkbox value into one database filed
body: <p>I'm developing a system in which im asking user to mark as checked products which customer whats to buy. i have created this product table in details and created a list of checkboxes dynamically based upon entry made in product table. below is my codes to created check boxes.</p>
  
  <pre><code>    $query_parent4 = mysql_query("SELECT * FROM product") or die("Query failed: ".mysql_error());
      &lt;div class="col-sm-8 icheck "&gt;
      &lt;?php while($row = mysql_fetch_array($query_parent4)): ?&gt;
      &lt;div class="square-blue single-row"&gt;
      &lt;div class="checkbox" &gt;
      &lt;input  name="product[]" value="&lt;?php echo $row['product_id']; ?&gt;" type="checkbox"&gt;&lt;label&gt; &lt;?php echo $row['product_name']; ?&gt;&lt;/label&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;?php endwhile; ?&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Now i want store all the selected checkbox value in a filed which i have created in customer table with name of 'Product' like given below </p>
  
  <p>Product : 1:2:3:4:5</p>
  
  <p>im using below mention code to achieve this task but not getting success on this </p>
  
  <pre><code>&lt;?php
  if(isset($_POST['submit']))
  {
      $fac=$_POST['product'];
      $fac1=implode(":",$fac);
  
      $sql=mysql_query("update hotel_info set product='$fac1' where custid=$custid");
  
  }
  ?&gt;
  </code></pre>
  
  <p>Please Help!!!</p>