<?php
include("../db.php");

if (isset($_POST['course_id'])) {
    $course_id = mysqli_real_escape_string($con, $_POST['course_id']);

    $fee_sql = mysqli_query($con, "SELECT course_avg_fee FROM clg_course WHERE sl_no = '$course_id'");
    if ($fee_row = mysqli_fetch_assoc($fee_sql)) {
        echo $fee_row['course_avg_fee'];
    } else {
        echo "N/A"; // Default response if no fee found
    }
}
?>