title: How to insert multiple data into database with php
body: <p><strong>UPDATE:</strong></p>
  
  <p>How to insert multiple data into database?
  I have Product tabel with 3 fields. status int 1, id_product varchar 10, and name_product varchar 30.
  Here is my code:</p>
  
  <pre><code>&lt;table border='1' cellpadding='2' cellspacing='5'&gt;
  &lt;tr&gt;
    &lt;th&gt;STATUS&lt;/th&gt;
    &lt;th&gt;PRODUCT ID&lt;/th&gt;
    &lt;th&gt;PRODUCT NAME&lt;/th&gt;
    &lt;th&gt;CHOOSE&lt;/th&gt;
  &lt;/tr&gt;
  
  &lt;?php
    include "connect.php";
    $sql = "SELECT * FROM PRODUCT WHERE IDCUSTOMER = $_SESSION[IDCUSTOMER]";
    $query = mysql_query($sql);
    while($result = mysql_fetch_array($query)){
    echo"&lt;td&gt;&lt;select name='status'&gt;&lt;option value='0'&gt;BUY&lt;/option&gt;
    &lt;option value='1'&gt;SELL&lt;/option&gt;
    &lt;option value='2'&gt;LOAN&lt;/option&gt;
    &lt;/select&gt;&lt;/td&gt;
    &lt;td&gt;$result[id_product]&lt;/td&gt;
    &lt;td&gt;$result[name_product]&lt;/td&gt;
    &lt;td&gt;&lt;input type='checkbox' name='check' /&gt;&lt;/td&gt;";
    }
  ?&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>The data that I want to insert into database is status, id_product, and name_product.</p>
  
  <p>I want to insert this multiple data when checkbox is checked.
  I have don't know how to insert them.
  I hope anyone here can help me :-).
  I really appreciates any help.</p>