Select HTML Row and get cells Values.

Select HTML Row and get cells Values.

Hi,
I working on a html table and want to get row wise information of that. please check the attachment.

this is my code

  1. <?php
  2. //if(isset($_POST['submit']))
  3. // { 
  4.  include ("db.php");
  5.  $query_for_result=mysql_query("SELECT * FROM pro_production ORDER BY production_id");
  6. $num=mysql_numrows($query_for_result);
  7. //echo <<<end
  8. //<table align="right" >
  9. //<tr>
  10. //<td bgcolor="#6f0d00" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; padding:3px 5px 3px 5px; color:#FFFFFF;" >Total Result Search</td><td>&nbsp;</td><td bgcolor="#000000"  style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; padding:3px 5px 3px 5px; color:#FFFFFF;">$num</td>
  11. //</tr>
  12. //</table>
  13. //end;
  14. mysql_close();
  15. ?>
  16. <div id="main" style="width: 100%; float:left; border:solid #CCCCCC; background-color:#FFFFFF; overflow:scroll; height:500px;">
  17. <table width="1800" align="center" border="1" cellspacing="0" cellpadding="0" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; color:#000000; border:solid #d6d4d5; border-width:1px; margin-top:0px;">
  18.   <tr>
  19.     <td>S.No.</td>
  20.     <td>Booking Date</td>
  21.     <td>Delivery Date</td>
  22.     <td>Order Number</td>
  23.     <td>Customer Name</td>
  24.     <td>Status</td>
  25.     <td>Product Range</td>
  26.     <td >Cover</td>
  27.     <td >Size</td>
  28.     <td>Accessory</td>
  29.     <td>Bag</td>
  30.     <td>Packing</td>
  31.     <td>Delivery</td>
  32.     <td>Paper</td>
  33.     <td>Coating</td>
  34.     <td>Priority</td>
  35.     <td>Advance</td>
  36.     <td>G Total</td>
  37.     <td>Balance</td>
  38.   </tr>
  39.   <?php
  40. $i=0;
  41. while ($i < $num)
  42.  {
  43. $f1=mysql_result($query_for_result,$i,"production_id");
  44. $f2=mysql_result($query_for_result,$i,"booking_date");
  45. $f3=mysql_result($query_for_result,$i,"delivery_date");
  46. $f4=mysql_result($query_for_result,$i,"order_no");
  47. $f5=mysql_result($query_for_result,$i,"salutation");
  48. $f6=mysql_result($query_for_result,$i,"customer_name");
  49. $f7=mysql_result($query_for_result,$i,"status");
  50. $f8=mysql_result($query_for_result,$i,"product_range");
  51. $f9=mysql_result($query_for_result,$i,"cover");
  52. $f10=mysql_result($query_for_result,$i,"size");
  53. $f11=mysql_result($query_for_result,$i,"accessory");
  54. $f12=mysql_result($query_for_result,$i,"bag");
  55. $f13=mysql_result($query_for_result,$i,"packing");
  56. $f14=mysql_result($query_for_result,$i,"delivery");
  57. $f15=mysql_result($query_for_result,$i,"coating");
  58. $f16=mysql_result($query_for_result,$i,"priority");
  59. $f17=mysql_result($query_for_result,$i,"advance");
  60. $f18=mysql_result($query_for_result,$i,"gtotal");
  61. $f19=mysql_result($query_for_result,$i,"balance");
  62. $f20=$f5.$f6;
  63. $f21=mysql_result($query_for_result,$i,"paper");

  64. $id=$i+1;
  65. ?>
  66.    
  67.    <tr >  
  68.    
  69.     <td><?php echo $id; ?></td>
  70.     <td><?php echo $f2; ?></td>
  71.     <td><?php echo $f3; ?></td>
  72.     <td><?php echo $f4; ?></td>
  73.     <td><?php echo $f20; ?></td>
  74.     <td><?php echo $f7; ?></td>
  75.     <td><?php echo $f8; ?></td>
  76.     <td><?php echo $f9; ?></td>
  77.     <td><?php echo $f10; ?></td>
  78.     <td><?php echo $f11; ?></td>
  79.     <td><?php echo $f12; ?></td>
  80.     <td><?php echo $f13; ?></td>
  81.     <td><?php echo $f14; ?></td>
  82.     <td><?php echo $f21; ?></td>
  83.     <td><?php echo $f15; ?></td>
  84.     <td><?php echo $f16; ?></td>
  85.     <td><?php echo $f17; ?></td>
  86.     <td><?php echo $f18; ?></td>
  87.     <td><?php echo $f19; ?></td>

  88.   </tr>
  89.   <?php
  90. $i++;      

  91. }

  92. ?>

  93. </table>
  94. </div>      

What i want that if i select row first and the click on any of the bottom buttons then i could get the whole information of that row.
I have done lot of search but i only able to get the data when click on the row itself but not when i clicked on the bottom button, 

So if any one can help me in this regard then i will be very thankful.

thanks