<?php
    header('Access-Control-Allow-Origin: *');
    header('Access-Control-Allow-Methods: GET, POST');
    header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization");
    include '../../../config/index.php';
    $data = array();
    $sql1="SELECT * FROM course_lesson_plan WHERE course_id='".$_GET["course_id"]."' ";
    $result1 = mysqli_query($conn, $sql1); 
    if (mysqli_num_rows($result1) > 0) {
        while($row1 = mysqli_fetch_assoc($result1)) {
            array_push($data, $row1);
        }
    }

    echo json_encode($data);
?>