Get data from a page with the same form elements
<p>I have page called account.php
It displays user data from a mysql table.(in this question i will use a mail system as an example)</p>

<p>The account page has the following code in it:</p>

<pre><code>while($stmt-&gt;fetch()){
    echo "&lt;tr&gt;
    &lt;td&gt;
    &lt;form action='action.php' method='POST'&gt;
        &lt;input type='hidden' name='mail_id' value='$mail_id'&gt;
         Mail:$mail_subject
        &lt;input type='submit' name='reply value='reply'&gt;
        &lt;input type='submit' name='delete' value='delete'&gt;

    &lt;form&gt;
    &lt;/td&gt;
    &lt;/tr&gt; ";
}
</code></pre>

<p>where
In action.php I have this code:</p>

<pre><code>if(isset($_POST['reply'])){
   echo "$_POST['mail_id']";
} 
if(isset($_POST['delete'])){
   echo "$_POST['mail_id']";
} 
</code></pre>

<p>In the the rendered html. the last mail_id is 101
and when i click the reply button on mail_id '35' the post value  returned is 101.</p>

<p>My question is how can I obtain mail_id '35' when I click the reply button in the mail_id '35' row and not '101'</p>