<?php
include('includes/dbconnection.php');

if (isset($_POST['class_name'])) {
    $class_name = $_POST['class_name'];

    $sections_result = $con->query("SELECT DISTINCT section FROM class_section WHERE Class = '$class_name'");

    echo '<option value="">Select Arm</option>';
    while ($row = $sections_result->fetch_assoc()) {
        echo '<option value="' . $row['section'] . '">' . $row['section'] . '</option>';
    }
}
?>