Hi Friends
Pls help me, i have posted the code below, i am trying to multiply 2 text box values from thisqty and prate and final value has to be show in thisamt text box, and also i have attachment the screen shot
<form method="post" action="#" enctype="multipart/form-data" name="billing">
<table width="1000" border="0" align="center" cellpadding="1" cellspacing="1" class="table_style1" id="billing">
<tr>
<th width="50" rowspan="2" bgcolor="#E4E4E4" class="table_title">S.No</th>
<th width="125" rowspan="2" bgcolor="#E4E4E4" class="table_title">Item</th>
<th width="100" rowspan="2" bgcolor="#E4E4E4" class="table_title">Units</th>
<th width="91" rowspan="2" bgcolor="#E4E4E4" class="table_title">Rate</th>
<th height="30" colspan="2" bgcolor="#E4E4E4" class="table_title">Previous Bill</th>
<th colspan="2" bgcolor="#E4E4E4" class="table_title">This Bill</th>
<th colspan="2" bgcolor="#E4E4E4" class="table_title">Upto Date Bill</th>
</tr>
<tr class="table_title">
<th width="100" height="25" bgcolor="#E4E4E4">Qty</th>
<th width="100" bgcolor="#E4E4E4">Amount</th>
<th width="100" bgcolor="#E4E4E4">Qty</th>
<th width="100" bgcolor="#E4E4E4">Amount</th>
<th width="100" bgcolor="#E4E4E4">Qty</th>
<th width="100" bgcolor="#E4E4E4">Amount</th>
</tr>
<tr>
<br /><br />
<?php
$desr="select * from billing_description where description_title='EARTH WORK & SAND FILLING'";
//echo $desr;
$r=mysql_query($desr,$conn);
$i=1;
//$item=$m["description_item"];
while($m=mysql_fetch_array($r))
{
$bitem=$m["description_item"];
$bdata="select sum(curr_qty), sum(curr_amount) from billingdata where item='$bitem'";
//echo $bdata;
$bdatar=mysql_query($bdata,$conn);
$bdatam=mysql_fetch_array($bdatar);
//$pqty=$bdatam["sum(curr_qty)"];
//echo $pqty;
$prate = $m["description_rate"];
//echo $prate;
//$pamt=$pqty*$prate;
$thisamt = $thisqty*$prate;
echo $thisamt;
?>
<td class="qty"><?php echo $i; ?></td>
<td width="250" height="30" class="textinner"><textarea name="item_1" rows="1" readonly="readonly" class="textinner" id="item_1"><?php echo $m["description_item"];?></textarea></td>
<td class="units"><?php echo $m["description_units"];?> </td>
<td class="rate"><input name="prate" type="text" disabled="disabled" class="prate" id="prate" value="<?php echo $prate;?>" readonly="true" /> </td>
<td class="qty" width="100"><?php echo $bdatam["sum(curr_qty)"];?></td>
<td class="rate" width="94"><?php echo $bdatam["sum(curr_amount)"];?></td>
<td align="center" ><input name="thisqty" type="text" class="thisqty" id="thisqty" value="<?php echo $bdatam["thisqty"];?>" size="12" /></td>
<td align="right"><input name="thisamt" type="text" class="thisamt" id="thisamt" value="<?php echo $thisamt; ?>" readonly="readonly";/></td>
<td></td>
<td></td>
</tr>
<?php $i++; } ?>
</table>
</form>