Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table class="table table-bordered table-striped table-dark">
- <thead class="thead-danger">
- <th><br>NIS</th>
- <th><br>NAMA</th>
- <th><br>JENIS KELAMIN<br></th>
- <th><br>TELEPON</th>
- <th><br>ALAMAT</th>
- <th><br>FOTO</th>
- <th colspan="1">AKSI</th>
- </tr>
- </thead>
- <?php
- include "koneksi.php";
- $batas=3;
- $qjum= mysqli_query($koneksi,"SELECT*FROM siswa") or die ($koneksi);
- $jum=mysqli_num_rows($qjum);
- $halaman=ceil($jum/$batas);
- $page=(isset($_GET['page'])) ? $_GET['page']:1;
- $posisi=($page-1)* $batas;
- if(isset($_POST['cari'])){
- $cari=$_POST['search'];
- $result=mysqli_query($koneksi,"SELECT * FROM siswa where Nis like '%".$cari."%' or Nama like'%".$cari."%'");
- }
- else{
- $result=mysqli_query($koneksi,"SELECT * FROM siswa LIMIT $posisi $batas") or die($koneksi);
- }
- while ($data=mysqli_fetch_array($result)){
- echo"<tr>";
- echo"<td>".$data['Nis']."</td>";
- echo"<td>".$data['Nama']."</td>";
- echo"<td>".$data['JenisKelamin']."</td>";
- echo"<td>".$data['telp']."</td>";
- echo"<td>".$data['Alamat']."</td>";
- echo"<td><img src='img/".$data['Foto']."'width='100' height='100'></td>";
- echo"<td><a href='edit.php?Nis=".$data['Nis']."'>Ubah</a></td>";
- echo"<td><a href='hapus.php?Nis=".$data['Nis']."'>Hapus</a></td>";
- }
- ?>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement