Hỏi về Action PHP trong submit form HTML

Chào mọi người,
Hiện này e đang tự học PHP nhưng tự mò mẫm nên tiến độ chậm chạp quá :frowning:
E hiện đang tạo một website như sau:


Sau khi chọn ngày thì sẽ lấy dữ liệu của ngày hôm đó từ database.
Nếu ngày được chọn là ngày hiện tại thì cái bảng sẽ tự động refresh mỗi 5s <Đã xong>
Dưới đây là một đoạn code trong homepage.php, nó sẽ gọi set_day.php thông qua action form html, e sử dụng ajax để chặn chuyển hướng sang set_day.php.
Vấn đề của e là không biết làm thế nào để truyền dữ liệu từ từ set_day.php qua js.php (file để tạo bảng) để query data theo ngày vừa được chọn. E có thử tìm hiểu và thử sử dụng session PHP nhưng vẫn không được, có vẻ như là 3 file php đều không biết giá trị $_SESSION[‘setday’] của nhau.
Mong mọi người giúp đỡ ạ !!!
Một phần code trong homepage.php

<!--    Date form-->
    <form id = "myform" action="set_day.php" method="get">
        Date:
        <input id ="datePicker" type="date" name="jour">
        <input type="submit" name="Submit" value="Set day" />
    </form>
<!--    Using Ajax to avoid redirect-->
    <script>
        $(function() {
            $("#myform").on("submit", function(e) {
                e.preventDefault();
                $.ajax({
                    url: $(this).attr("action"),
                    type: 'GET',
                    data: $(this).serialize(),
//                    beforeSend: function() {
//                        $("#message").html("sending...");
//                    },
                    success: function(data) {
                        $("#message").hide();
                        $("#response").html(data);
                    }
                });
            });
        });
    </script>
<!--    Show table 1st time-->
    <div id="tableID">
        <?php
            session_start();
            include_once'js.php';
        ?>
    </div>

Đây là code trong set_day.php

<?php
    session_start();
    $_SESSION['setday'] = $_GET['jour'];
    $_SESSION['setday'] = date('Y-m-d', strtotime($_SESSION['setday']));
    echo $_SESSION['setday'];
?>

Đây là một đoạn code trong js.php

    session_start();
    require_once 'ConnectDB.php';
    mysqli_select_db($connection,"SNCF");
    date_default_timezone_set('Europe/Paris');
    if ($_SESSION['setday'] = date('Y-m-d',strtotime("1970-01-01"))){
        $phpdate = date('Y-m-d', time()); //date format
    } else {
        $phpdate = $_SESSION['setday'];
    }

Hiện tại thì e đã bỏ đi set_day.php. Thay vào đó sẽ truyền dữ liệu từ form trực tiếp vào js.php

    <script>
        $(function() {
            $("#myform").on("submit", function(e) {
                e.preventDefault();
                $.ajax({
                    url: "js.php",
                    type: 'GET',
                    data: $(this).serialize(),
                    success: function(data) {
                        $("#message").hide();
                        $("#response").html(data);
                    }
                });
            });
        });
    </script>

js.php

    require_once 'ConnectDB.php';
    mysqli_select_db($connection,"SNCF");
    date_default_timezone_set('Europe/Paris');
    if (isset($_GET['jour'])) {
        $phpdate = date('Y-m-d',strtotime($_GET['jour']));
    } else {
        $phpdate = date('Y-m-d', time()); //date format
    };
    echo $phpdate;

    $datestr = $phpdate.' '.'00:00:00'; //string format
    $phpdate0 = date("Y-m-d H:i:s", strtotime($datestr));
    $datestr = $phpdate.' '.'23:59:59';
    $phpdate24 = date("Y-m-d H:i:s", strtotime($datestr));
    $query = "SELECT * FROM SRC2017 
              WHERE Heure >= '$phpdate0' AND Heure <= '$phpdate24'
              ORDER BY Heure DESC";
    $result = mysqli_query($connection,$query);
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?