Advertisement
Guest User

aksi.php

a guest
May 23rd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. <?php
  2. require_once "../_config/config.php";
  3. if(!isset($_POST["produk"])){
  4. $produk = $_POST["produk"];
  5. $harga = $_POST["harga"];
  6. $jumlah = $_POST["jumlah"];
  7. ?>
  8. <div class="table-responsive">
  9. <table class="table table-striped table-bordered table-hover" id="list_produk">
  10. <thead>
  11. <tr>
  12. <th>No.</th>
  13. <th>Nama Produk</th>
  14. <th>Jumlah</th>
  15. <th>Total Harga</th>
  16. <th><i class="glyphicon glyphicon-cog"></i></th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. <!-- Menampilkan Data Dari Database -->
  21. <?php
  22. $no = 1;
  23. $total = $jumlah * $harga;
  24. ?>
  25. <tr>
  26. <td><?=$no++?></td>
  27. <td><?=$produk?></td>
  28. <td><?=$jumlah?></td>
  29. <td><?=format_rp($total)?></td>
  30. <td align="center">
  31. <a href="edit.php?id=<?=$data['id_produk']?>" class="btn btn-warning btn-xs"><i class="glyphicon glyphicon-cog"></i></a>
  32. <a href="del.php?id=<?=$data['id_produk']?>" class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i></a>
  33. </td>
  34. </tr>
  35. <!-- Akhir Query -->
  36. </tbody>
  37. </table>
  38. </div>
  39. <?php
  40. }
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement