<?
session_start();
include"../plg/ses.php";
include"../plg/kon.php";
$nip = $_GET['nip'];
$sql = "select * from karyawan where nip='$nip'";
$res = $conn->query($sql);
while($a = $res->fetch_assoc()){
  $nipnya = $a['nip'];
}
if($nipnya == $nip){
  ?>
  <script>
  alert('NIP <?=$nip?> SUDAH DIGUNAKAN, COBA GUNAKAN NOMOR YG LAIN ?...');
  parent.ulang();
  </script>
<?
}
else{
  ?>
  <script>
  parent.document.getElementById('btnsave').style="display:";
  </script>
  <?
}
?>
