Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tampil_data.php
- <div class="container" align="center">
- <div class="col-md-10">
- <h3><font color="#f30717"> Tampil Data Karyawan </font></h3>
- <br>
- <div class="text-left" style="margin-bottom:3px;">
- <a href="index.php?hal=tambah" class="btn btn-danger"> Tambah Data </a>
- </div>
- <table id="dataTables-example" class="table table-striped table-bordered table-hover " align="center">
- <tr>
- <th><div align="center"> No </div></th>
- <th><div align="center"> Tanggal </div></th>
- <th><div align="center"> Nip </div></th>
- <th><div align="center"> Nama </div></th>
- <th><div align="center"> Gaji </div></th>
- <th><div align="center"> Potongan </div></th>
- <th><div align="center"> Total Gaji </div></th>
- <th><div align="center"> Opsi </div></th>
- </tr>
- <?php
- include"koneksi.php";
- $sql=mysql_query("select * from data_pegawai");
- $no=1;
- while($row=mysql_fetch_array($sql)){
- $total_gaji=$row["gaji"]-$row["potongan"];
- ?>
- <tr>
- <td><div align="center"><?php echo "$no"; ?> </div></td>
- <td> <div align="center"><?php echo "$row[tgl]"; ?> <div></td>
- <td><div align="center"><?php echo "$row[nip]"; ?><div></td>
- <td><div align="center"><?php echo "$row[nama]"; ?><div></td>
- <td><div align="center"><?php echo "$row[gaji]"; ?><div></td>
- <td><div align="center"><?php echo "$row[potongan]"; ?><div></td>
- <td><div align="center"><?php echo "$total_gaji"; ?><div></td>
- <td><div align="center"> <a href="index.php?hal=edit&nip=<?php echo"$row[nip]";?>" class="btn btn-danger"> Edit
- <a href="delete.php?nip=<?php echo"$row[nip]";?>" class="btn btn-danger"> Hapus <div></td>
- </tr>
- <?php
- $no++;
- }
- ?>
- </table>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement