How to update multiple mysql fields with an update button using php
<p>I have a table in my database with a few fields. I am using this form to select data from this table:</p>

<pre><code>&lt;form id="#" name="#"  method= "post" action="cms_order_detail.php"&gt; 
    &lt;table width="100%" border="1" align="center"&gt; 
        &lt;th&gt; Item &lt;/th&gt;
        &lt;th&gt; Price &lt;/th&gt;
        &lt;th&gt; Active &lt;/th&gt;
        &lt;tr&gt; 
        &lt;?php 
        $sql= mysql_query("SELECT * FROM `product` where `item_id` = '$id' AND `type`=0 ");
        while($row= mysql_fetch_array($sql)){
            $price      =   $row['price'];
            $item_id    =   $row['item_id'];
            $size       =   $row['size'];
        ?&gt;
            &lt;td class="price"&gt; &lt;?php echo $size;?&gt;  &lt;/td&gt;
            &lt;td class="price" width="1px"&gt; 
                &lt;input type="number" name="pro_price" id="pro_price" value="&lt;?php echo $price;?&gt;" style="width:4.2em; " &gt; 
            &lt;/td&gt;
            &lt;td align="center"&gt;
                &lt;input type="number" name="onof" id="onof" value="&lt;?php echo $row['active'];?&gt;" style="width:2.5em; " min="0" max="1" title="1= active and 0= De-active"&gt; 
            &lt;/td&gt;
        &lt;/tr&gt;   
        &lt;?php }?&gt;
    &lt;/table&gt; 
    &lt;button class="updateBtn"&gt; Update &lt;/button&gt; 
    &lt;div style="clear:both"&gt; &lt;/div&gt;
&lt;/form&gt;
</code></pre>

<p>I have to update the table using MySQL and PHP. How to do it? The screenshot of my web page is as below.</p>

<p><img src="https://i.stack.imgur.com/MYrU2.png" alt="Screen Shot"></p>

<p>When I click up update button the above rows should be updated. Please see the image for clear message. </p>