<?php
// =====================================================
// GET /all_line_man.php
// Response: JSON Array [ { name } ]  (for dropdown)
// =====================================================
require_once 'config.php';

$conn = getConnection();

$result = $conn->query("SELECT name FROM line_man ORDER BY name ASC");

$lineManNames = [];
while ($row = $result->fetch_assoc()) {
    $lineManNames[] = [
        "name" => $row['name']
    ];
}

echo json_encode($lineManNames);

$conn->close();
