<?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';

    $sql1 = "INSERT INTO curriculumSession VALUES (NULL,
        '".$_GET["curriculumEnrollment_id"]."',
        '".$_GET["SessionName"]."',
        '".$_GET["StartSession"]."',
        '".$_GET["EndSession"]."',
        now())";
    // echo  $sql1."\n";
    if (mysqli_query($conn, $sql1)) {

        $curl_post_data = array(
            'Success' => 'true',
            'curriculumEnrollment_id' => $_GET["curriculumEnrollment_id"] ,
        );
        echo json_encode($curl_post_data);  
    } else {

        $curl_post_data = array(
            'Success' => 'false',
            'curriculumEnrollment_id' => $_GET["curriculumEnrollment_id"], 
        );
        echo json_encode($curl_post_data);              
    }
    
?>