Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "Config.php";
- $query=mysql_query("select * from tbbarang");
- $jumlah=mysql_num_rows($query);
- echo "Jumlah data ada : ".$jumlah;
- ?>
- <table border="1" cellspacing="0">
- <tr>
- <th>KodeBarang</th>
- <th>NamaBarang</th>
- <th>HargaSatuan</th>
- </tr>
- <?php
- while($row=mysql_fetch_array($query)){
- ?>
- <tr>
- <td><?php echo $row['KodeBarang'];?></td>
- <td><?php echo $row['NamaBarang'];?></td>
- <td><?php echo $row['HargaSatuan'];?></td>
- <td>
- <a href="delete.php?KodeBarang=<?php echo $row['KodeBarang']; ?>" onclick="return confirm('Apakah anda
- yakin?')"><img src="button-cross.gif" width="20" height="20" /></a>
- <a href="update.php?KodeBarang=<?php echo $row['KodeBarang']; ?>"><img src="button-edit.gif" width="20" height="20" /></a>
- </td>
- <?php
- }
- ?>
- </table><br />
- <a href="index.php">Tambah Data</a><br><br>
Add Comment
Please, Sign In to add comment