<?php
require_once 'koneksi.php';
$query = mysqli_query($conn, "SELECT barang_nama FROM barang LIMIT 5");

if (!$query) {
    echo "Error Database: " . mysqli_error($conn);
} else {
    echo "Berhasil! Data ditemukan: <br>";
    while ($row = mysqli_fetch_assoc($query)) {
        echo "- " . $row['barang_nama'] . "<br>";
    }
}
?>