0

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

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by ddymacek
0

your link doesn't work, and what is your question.
what do you want to total on this page?
there are no "total = harga * unit;" 'harga' or 'unit' variables on this page at all.
there are no form tags and no submit button on your form.
what is your question, what are you trying to do?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.