Passing form values via POST method in form Update
<p>I've a sql database table which I'm displaying on a webpage using HTML tables. The last column of the table is an "edit" option via which I wish to prompt the user to update the data.</p>

<p>For this I want to pass those data values for the row ID which was selected by the user to edit.</p>

<p>My display table has the following code</p>

<pre><code>&lt;?php
    while($row = mysql_fetch_array($fetched_value, MYSQL_ASSOC))
        {
            echo
                "&lt;tr&gt;
                    &lt;td&gt;{$row['name']}&lt;/td&gt;
                    &lt;td&gt;{$row['email_id']}&lt;/td&gt;
                    &lt;td&gt;{$row['mobile_number']}&lt;/td&gt;;
                    echo '&lt;td&gt;&lt;button id="edit_button" name="edit_button" type="submit" style="border:0; background:transparent;"&gt;&lt;i class="fa fa-pencil-square-o" aria-hidden="true" style="color:#006600;"&gt;&lt;/i&gt;&lt;/button&gt;&lt;/td&gt;';
                echo "&lt;/tr&gt;\n";
        }
?&gt;
</code></pre>

<p>where, </p>

<pre><code>&lt;?php $fetched_value = mysql_query( $fetch_query, $conn ); ?&gt;
</code></pre>

<p>Please note that at the end of every row I've an edit button, which I want to use for further processing.</p>

<p>I want to call (via <code>POST</code> method) a local php file, say <code>update-data.php</code>, in which there will be code to accept the <code>POST</code>ed data, display the table and also to <strong>prefill</strong> the form spaces.</p>

<p>However I'm unable to pass the data to this update PHP file using the <code>POST</code> method. </p>

<p>Can you please suggest a way to pass those particular data values for which the update link was clicked?</p>