<?php
include('koneksi.php');
$sql = "SELECT * FROM products WHERE stok > 0";
$result = $conn->query($sql);

$products = [];

if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        $products[] = $row;
    }
}
$conn->close();
?>