<?php
require 'require/conn.php';

if (isset($_POST['network'])) {
    $network = $_POST['network'];
    $query = "SELECT plan_name FROM data_plans WHERE network = ?";
    $stmt = $conn->prepare($query);
    $stmt->bind_param("s", $network);
    $stmt->execute();
    $result = $stmt->get_result();

    while ($row = $result->fetch_assoc()) {
        echo "<option value='{$row['plan_name']}'>{$row['plan_name']}</option>";
    }
}
?>
