<?php
include '../koneksi.php';

        $q = $_GET['term']; // variabel $q untuk mengambil inputan user
        $sql = mysql_query("SELECT * FROM PERSONAL WHERE NIK LIKE '%".$q."%'"); // menampilkan data yg ada didatabase yg sesuai dengan inputan user ( nik )
        while ($data = mysql_fetch_array($sql)){
               
                $row['value']    =$data['NIK'];
                $row['NAMA']    =$data['NAMA'];
                $row['BPJS_KESEHATAN']    =$data['BPJS_KESEHATAN'];
                $row['BPJS_TK']    =$data['BPJS_TK'];
                $row['GOL_DARAH']    =$data['GOL_DARAH'];
                $row['NO_NPWP']    =$data['NO_NPWP'];
                $row['NO_REKENING']    =$data['NO_REKENING'];
                $row['NAMA_PEMILIK_REKENING']    =$data['NAMA_PEMILIK_REKENING'];
                $row['NAMA_BANK']    =$data['NAMA_BANK'];
                $row_set[]        =$row;
        }
        //echo json_encode($result);
        echo json_encode($row_set);
?>

