<?php
require_once 'shikanisha.kts.php';

$query = "SELECT * FROM roles ORDER BY role_name";
$result = $conn->query($query);

$roles = array();
while ($row = $result->fetch_assoc()) {
    $roles[] = $row;
}

header('Content-Type: application/json');
echo json_encode($roles);
$conn->close();
?>