save values from editable table using php
<p>Hi I have a table generated from php, it is editable, I want to save edited values to database. I have no Idea how can I do this as there are many rows(dynamic) on a page.
Here is a screen-shot:-<a href="https://i.stack.imgur.com/kH54w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kH54w.png" alt="enter image description here"></a></p>

<p>Please suggest</p>

<p>Edit:-</p>

<p>My code is </p>

<pre><code>    echo "&lt;table border='1'&gt;
&lt;tr&gt;
&lt;th&gt;Sl Number&lt;/th&gt;
&lt;th&gt;Product Id&lt;/th&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Product Catagory&lt;/th&gt;
&lt;th&gt;Retal Price&lt;/th&gt;
&lt;th&gt;Max Price&lt;/th&gt;
&lt;th&gt;Min Price&lt;/th&gt;
&lt;th&gt;Initial Stock&lt;/th&gt;
&lt;th&gt;Quantity Sold&lt;/th&gt;
&lt;th&gt;Current Stock&lt;/th&gt;
&lt;th&gt;Last Order&lt;/th&gt;
&lt;th&gt;Edit/Update&lt;/th&gt;
&lt;/tr&gt;";
while($row = $result-&gt;fetch_assoc())
{
        echo "&lt;tr contenteditable&gt;";
    echo "&lt;td&gt;" . $row["Row Number"]. "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row["Product Id"]. "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row["Product Name"]. "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row["Product Catagory"]. "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row["Retal Price"]. "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row["Max Price"]. "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row["Min Price"]."&lt;/td&gt;";
    echo "&lt;td&gt;" . $row["Initial Stock"]."&lt;/td&gt;";
    echo "&lt;td&gt;" . $row["Quantity Sold"]. "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row["Current Stock"]."&lt;/td&gt;";
    echo "&lt;td&gt;" . $row["Last Order"]."&lt;/td&gt;";
    echo "&lt;td contenteditable = 'false'&gt;&lt;button href = '#'&gt;Update&lt;/a&gt;&lt;/td&gt;";
        echo "&lt;/tr&gt;";   
}
</code></pre>