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

$keyword = $_POST['jservice'];

$query = mysqli_query($konek, "
    SELECT *
    FROM jenis_service
    WHERE jenis_service LIKE '%$keyword%'
    LIMIT 5
");

if (mysqli_num_rows($query) > 0) {
    while ($row = mysqli_fetch_assoc($query)) {
        echo '<div class="list-group-item service-item" 
                data-id="' . $row['idjenis_service'] . '"
                data-nama="' . $row['jenis_service'] . '"
                data-idservice="'.$row['idjenis_service'].'">
                ' . $row['jenis_service'] .
            '</div>';
    }
}
