<?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();
    $data = json_decode(file_get_contents('php://input'), true);


    $sql_two = "UPDATE packages  SET
        PackageName='".$_GET["PackageName"]."',
        Price='".$_GET["Price"]."',
        Currency='".$_GET["Currency"]."',
        PriceDuration='".$_GET["PriceDuration"]."',
        PriceTarget='".$_GET["PriceTarget"]."',
        MinStudents='".$_GET["MinStudents"]."',
        MaxStudents='".$_GET["MaxStudents"]."',
        Status='".$_GET["Status"]."',
        BillingTarget='".$_GET["BillingTarget"]."',
        LmsAccess='".$_GET["LmsAccess"]."',
        CodingRoboticsCurriculum='".$_GET["CodingRoboticsCurriculum"]."',
        ResourceAccess='".$_GET["ResourceAccess"]."',
        QaVisits='".$_GET["QaVisits"]."',
        SchoolBranches='".$_GET["SchoolBranches"]."',
        AccountManager='".$_GET["AccountManager"]."',
        Support='".$_GET["Support"]."',
        TeachersTrained='".$_GET["TeachersTrained"]."',
        AdminAccounts='".$_GET["AdminAccounts"]."'
        WHERE package_id='".$_GET["package_id"]."'";
    
    if (mysqli_query($conn, $sql_two)) {
        $new_array = array(
            'Success' => "true",
            'Exists' => "true",
            'package_id' => $_GET["package_id"],
        );
        array_push($data, $new_array);
        
    } else {
        $new_array = array(
            'Success' => "false",
            'Exists' => "false",
            'package_id' => "",
            'dated' =>  "",
        );
        array_push($data, $new_array);
    }
    // }
  
    echo json_encode($data);


      
?>