-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathauto1.php
More file actions
19 lines (17 loc) · 744 Bytes
/
auto1.php
File metadata and controls
19 lines (17 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
include_once ('config/koneksi.php');
//$q = trim(strip_tags($_GET['term'])); // variabel $q untuk mengambil inputan user
$q = $_GET['term'];
$sql = mysqli_query($konek,"SELECT * FROM tbl_karyawan_all WHERE noreg LIKE '%".$q."%'"); // menampilkan data yg ada didatabase yg sesuai dengan inputan user
while ($data = mysqli_fetch_array($sql)){
//$result[] = htmlentities(stripslashes($data['nm_jabatan_eks'])); // manempilkan nama jabatan
//$row['value'] =$data['kode_barang'];
$row['value'] =$data['noreg'];
$row['nama_lengkap'] =$data['nama_lengkap'];
$row['nama_panggilan'] =$data['nama_panggilan'];
$row['departemen'] =$data['departemen'];
$row_set[] =$row;
}
//echo json_encode($result);
echo json_encode($row_set);
?>