如何从PHP复选框中获取值?

I have a form where there is a check box, on selecting this box values from different page gets loaded through ajax, after loading these values user can select them and then submit it and save it in database.

Values are getting loaded properly, however when I submit the form, the values are not getting carried to the backend.

<!doctype html>
<head>
    <script>
    $(document).ready(function () {
        $('#drive').change(function () {
            if ($(this).is(':checked')) {
                var catid = $('#drive').val();
                console.log($('#drive'))
                if (catid != 0)

                {
                    LodingAnimate();
                    $.ajax({
                        type: 'post',
                        url: 'c_datetime.php',
                        data: {
                            id: catid
                        },
                        cache: false,
                        success: function (returndata) {
                            $('#datetime').html(returndata);
                            console.log(returndata)
                        }
                    });

                    function LodingAnimate() {
                        $("#datetime").html('<img src="img/ajax-loader.gif" height="40" width="40"/>');
                    }
                }
            }else{
                $("#datetime").hide();
            }
        })
    })
    </script>
</head>
<body>  
    <?php
        if($_POST['save'])
            {
                $datee = mysqli_real_escape_string($con, $_POST['datee']);
                $timee = mysqli_real_escape_string($con, $_POST['timee']);
                echo $datee;
                echo $timee;
            }
    ?>
    <form class="form-horizontal"  enctype="multipart/form-data" role="form" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="POST">
        <input type="checkbox" name ="chk" id="drive" value="Drive" style="margin-left: -20px;" >Drive
        <div id="datetime"> </div>
        <button class="btn btn-default btn-border" style="color:white; border-radius: 25px;" type="submit" value="submit" name="save">PROCEED TO POSTING</button>
    </form>
</body>
</html>

c_datetime.php

<input type='text' class="form-control" name="datee" />
<input type='text' name="timee" class="form-control" />

Can anyone please tell how to resolve this issue?

You have error in this part. To see errors error_reporting(E_ALL);

<?php
    if(isset($_POST['save']))// added isset.
        {
            $datee = mysqli_real_escape_string($con, $_POST['datee']);
            $timee = mysqli_real_escape_string($con, $_POST['timee']);
            echo $datee;
            echo $timee;
        }
?>

What is $con?? If its connection object, you have missed include() in your code.