Im view total form
total = harga * unit;
View Sample Images :
http://www.daniweb.com/forums/attachment.php?attachmentid=22008&stc=1&d=1313603319
<table border="1">
<tr>
<td bgcolor="#6699FF">jenis</td>
<td bgcolor="#6699FF">harga</td>
<td bgcolor="#6699FF">unit</td>
<td bgcolor="#6699FF">total</td>
</tr>
<tr>
<td><?php
include"koneksi.php";
$result = mysql_query("select * from tpintu");
$jsArray = "var prdName = new Array();\n";
echo '<select name="prdId" onchange="document.getElementById(\'hargaBarang\').value = prdName[this.value]">';
while ($row = mysql_fetch_array($result)) {
echo '<option value="' . $row['jenis_pintu'] . '">' . $row['jenis_pintu'] . '</option>';
$jsArray .= "prdName['" . $row['jenis_pintu'] . "'] = '" . addslashes($row['harga_pintu']) . "';\n";
}
echo '</select>';
?>
</td>
<td>
<input name="hargaBarang" type="text" id="hargaBarang" size="22"/>
<script type="text/javascript">
<?php echo $jsArray; ?>
</script>
</td>
<td><input type="text" name="textfield" id="textfield"></td>
<td><input type="text" name="textfield2" id="textfield2"></td>
</tr>
<tr>
<td colspan="3" align="right">Total : </td>
<td><input type="text" name="textfield3" id="textfield3"></td>
</tr>
</table>
Thank'z