i created two buttons inside the while loop.while clicking that button i am getting last row of database.i want corrspoinding datas
<pre><code>while($s=mysql_fetch_row($q))
{
echo "&lt;table width=90% bgcolor='#6CDAF5' align=center&gt;
    &lt;tr&gt;&lt;th align=left&gt; Bug $i: &lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;Username: &lt;td&gt; $s[0] &lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;User email-id: &lt;td&gt;$s[1] &lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;User Contact-no :&lt;td&gt;$s[2] &lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;Bug: &lt;td&gt;&lt;textarea rows=5 cols=40 name=bug&gt;$s[3]&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;Bug-Reason: &lt;td&gt;&lt;textarea rows=5 cols=40  name=text1&gt;$s[4]&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;Bug-Solution:&lt;td&gt;&lt;textarea rows=5 cols=40 name=text2&gt;$s[5]&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;Updated-date:&lt;td&gt;&lt;input type=text value='$s[6]' name=date&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td width=100% align=right colspan=2&gt;&lt;input type=button name=addbug value='add this bug with main bugs' OnClick=validate()&gt;&lt;input type=button name=delete value='delete this bug' OnClick=delete()&gt;&lt;/tr&gt;
    &lt;/table&gt;&lt;br&gt;";
    $i++;
}
</code></pre>

<p>here i fetched all rows from database by using select * from troubleshoot; query...  each and every table contains two buttons..  after displaying tables in the browser,, while clicking button i am getting last table values only.. how to get corressponding button values while the clicking button</p>
