<html>
<head>
<title>Title here!</title>
</head>
<body>
<h3><div align="center">FAKTUR PENJUALAN</div></h3>
<table border=3 width=50% align="center">
<tr>
<th>No. </th>
<th>No Faktur</th>
<th>Kode Barang</th>
<th>Nama Pembeli</th>
<th>Quantity</th>
<th>Harga</th>
<th>Total</th>
<th>Bonus</th>
</tr>
<?
include('koneksi.php');
$qry=mysql_query("select *,qty*harga as total , if(qty>=2,'Silverqueen','Pocarisweat')as bonus from faktur",$koneksi);
$no=1;
while($row=mysql_fetch_array($qry))
{
?>
<tr>
<td> <? echo $no++; ?> </td>
<td> <? echo $row['nofaktur']; ?> </td>
<td> <? echo $row['kodebarang']; ?> </td>
<td> <? echo $row['namapembeli']; ?> </td>
<td> <? echo $row['qty']; ?> </td>
<td> <? echo $row['harga']; ?> </td>
<td> <? echo $row['total']; ?> </td>
<td> <? echo $row['bonus']; ?> </td>
</tr>
<?} ?>
</table>
</body>
</html>
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.