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
- <?php
- //if(isset($_POST['submit']))
- // {
- include ("db.php");
- $query_for_result=mysql_query("SELECT * FROM pro_production ORDER BY production_id");
- $num=mysql_numrows($query_for_result);
- //echo <<<end
- //<table align="right" >
- //<tr>
- //<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> </td><td bgcolor="#000000" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; padding:3px 5px 3px 5px; color:#FFFFFF;">$num</td>
- //</tr>
- //</table>
- //end;
- mysql_close();
- ?>
- <div id="main" style="width: 100%; float:left; border:solid #CCCCCC; background-color:#FFFFFF; overflow:scroll; height:500px;">
- <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;">
- <tr>
- <td>S.No.</td>
- <td>Booking Date</td>
- <td>Delivery Date</td>
- <td>Order Number</td>
- <td>Customer Name</td>
- <td>Status</td>
- <td>Product Range</td>
- <td >Cover</td>
- <td >Size</td>
- <td>Accessory</td>
- <td>Bag</td>
- <td>Packing</td>
- <td>Delivery</td>
- <td>Paper</td>
- <td>Coating</td>
- <td>Priority</td>
- <td>Advance</td>
- <td>G Total</td>
- <td>Balance</td>
- </tr>
- <?php
- $i=0;
- while ($i < $num)
- {
- $f1=mysql_result($query_for_result,$i,"production_id");
- $f2=mysql_result($query_for_result,$i,"booking_date");
- $f3=mysql_result($query_for_result,$i,"delivery_date");
- $f4=mysql_result($query_for_result,$i,"order_no");
- $f5=mysql_result($query_for_result,$i,"salutation");
- $f6=mysql_result($query_for_result,$i,"customer_name");
- $f7=mysql_result($query_for_result,$i,"status");
- $f8=mysql_result($query_for_result,$i,"product_range");
- $f9=mysql_result($query_for_result,$i,"cover");
- $f10=mysql_result($query_for_result,$i,"size");
- $f11=mysql_result($query_for_result,$i,"accessory");
- $f12=mysql_result($query_for_result,$i,"bag");
- $f13=mysql_result($query_for_result,$i,"packing");
- $f14=mysql_result($query_for_result,$i,"delivery");
- $f15=mysql_result($query_for_result,$i,"coating");
- $f16=mysql_result($query_for_result,$i,"priority");
- $f17=mysql_result($query_for_result,$i,"advance");
- $f18=mysql_result($query_for_result,$i,"gtotal");
- $f19=mysql_result($query_for_result,$i,"balance");
- $f20=$f5.$f6;
- $f21=mysql_result($query_for_result,$i,"paper");
- $id=$i+1;
- ?>
-
- <tr >
-
- <td><?php echo $id; ?></td>
- <td><?php echo $f2; ?></td>
- <td><?php echo $f3; ?></td>
- <td><?php echo $f4; ?></td>
- <td><?php echo $f20; ?></td>
- <td><?php echo $f7; ?></td>
- <td><?php echo $f8; ?></td>
- <td><?php echo $f9; ?></td>
- <td><?php echo $f10; ?></td>
- <td><?php echo $f11; ?></td>
- <td><?php echo $f12; ?></td>
- <td><?php echo $f13; ?></td>
- <td><?php echo $f14; ?></td>
- <td><?php echo $f21; ?></td>
- <td><?php echo $f15; ?></td>
- <td><?php echo $f16; ?></td>
- <td><?php echo $f17; ?></td>
- <td><?php echo $f18; ?></td>
- <td><?php echo $f19; ?></td>
- </tr>
- <?php
- $i++;
- }
- ?>
- </table>
- </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