Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "/class/pdoclass.php";
- $db = new crud();
- $tabel = "tblsiswa";
- $fild = "*";
- $db->select($tabel,$fild);
- $hasil = $db->getResult();
- //echo $hasil;
- ?>
- <html>
- <head>
- <title></title>
- <link type="text/css" rel="stylesheet" href="css/bootstrap.css" />
- </head>
- <body>
- <form id="FormDtSiswa" name="FormDtSiswa" method="post">
- <table class="table table-hover"><thead>
- <tr>
- <td>No</td>
- <td>NISN</td>
- <td>Nama</td>
- <td>Asal Sekolah</td>
- <td>Nilai Ujian Nasional</td>
- <td>Nilai Ujian Sekolah</td>
- <td>Nama Ayah</td>
- <td>Nama Ibu</td>
- </tr></thead>
- <tbody>
- <?php
- $data=json_decode($hasil, TRUE);//jadikan array dahulu
- $s='';$no=1;
- foreach($data['post'] as $row){
- $s.="<tr>";
- $s.="<td>".$no++."</td>";
- $s.="<td>{$row['Nisn']}</td><td>{$row['Nama']}</td>"; //sisanya lanjutkan sendiri
- $s.="</tr>";
- }
- print $s;$s='';
- ?> </tbody>
- </table>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement