Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>latihan - Datatables</title>
  5. <link rel="stylesheet" href="css/bootstrap.min.css"/>
  6. <link rel="stylesheet" href="css/dataTables.bootstrap.css"/>
  7. </head>
  8. <body>
  9. <div class="container">
  10. <table id="tb" class="table table-hover table-striped table-bordered">
  11. <tr class="info">
  12. <th >NISN</th>
  13. <th >NIS</th>
  14. <th >NAMA SISWA</th>
  15. <th >TEMPAT LAHIR</th>
  16. <th >TANGGAL LAHIR</th>
  17. <th >TAHUN MASUK</th>
  18. <th >KELAS</th>
  19. <th >PROSES</th>
  20. </tr>
  21. <?php
  22. include "koneksi/connect.php";
  23. $sql = "SELECT * FROM `perangkat`.`data_siswa`";
  24. $hasil = mysql_query($sql, $connect) or die ("Gagal coba berita");
  25. while ($data = mysql_fetch_array($hasil)) {
  26.  
  27. //melakukan pemanggilan seluruh record dari hasil mysql_query yang dsimpan pada $baris
  28. ?>
  29. <tr >
  30.  
  31. <td ><strong><?PHP echo $data['NISN']; ?></strong></td>
  32. <td ><?PHP echo $data['NIS']; ?></td>
  33. <td ><?PHP echo $data['nama_siswa']; ?></td>
  34. <td ><?PHP echo $data['tempat_lahir']; ?></td>
  35. <td ><?PHP echo $data['tanggal_lahir']; ?></td>
  36. <td ><?PHP echo $data['tahun_masuk']; ?></td>
  37. <td ><?PHP echo $data['kode_kelas']; ?></td>
  38. <td align="center">
  39. <a href="index.php?p=editdatasiswa&id=<?php echo $data['kode_siswa']; ?>" title="Ubah Data">
  40. <img src="images/Edit.jpg" width="25" height="25"></a>
  41. <a href="index.php?p=hapusdatasiswa&id_del=<?php echo $data['kode_siswa']; ?>"
  42. onClick="javascript:return confirm('hapus data ini?');" title="Hapus Data">
  43. <img src="images/delete.png" width="25" height="25"></a> </td>
  44. </tr>
  45. <?php
  46. }
  47. ?>
  48. </table>
  49. </div>
  50.  
  51. <script src="js/jquery.js"></script>
  52. <script src="js/bootstrap.min.js"></script>
  53. <script src="js/jquery.dataTables.js"></script>
  54. <script src="js/dataTables.bootstrap.js"></script>
  55. <script type="text/javascript">
  56. $(document).ready(function() {
  57. $("#tb").dataTable();
  58. });
  59. </script>
  60. </body>
  61. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement