从$ _GET方法获取ajax中php文件头的值

Hi friends I am is a beginner in AJAX so I am Facing some problem which is I am unable to take the values from the header of the page which was sent be $_GET method ..Help me Please to find out the Solution

here is my PHP Code

<?php include '../../db_connect/connection.php'; ?>

<?php

$select = "SELECT * FROM leave_requests WHERE teacher_name = '$teacher_id' ORDER BY id DESC";
$select_result = mysqli_query($connection,$select);
while ($row = mysqli_fetch_assoc($select_result)) {
    $date = $row['date'];
    $teacher = $row['teacher_name'];
    $days = $row['days'];
    $reason = $row['reason'];
    $status = $row['status'];
    $type_of_leave = $row['type_of_leave'];

    $principal_remarks = $row['principal_remarks'];
    $id = $row['id'];
    ?>

    <td><?php echo $date; ?></td>
    <td><?php echo $days; ?></td>
    <td><?php echo $type_of_leave; ?></td>
    <td><?php echo $reason; ?></td>


    <td><?php echo $status; ?></td>
    <td><?php echo $principal_remarks; ?></td>
    </tr>

<?php
} ?>

and this is my incomplete AJAX code

<script type="text/javascript">
$(document).ready(function(){
    $.ajax({
        url:'display_leave_request_response.php',
        data:
    });
});
</script>

how can I grab the values which is comming in a get request in the header using Ajax please explain

sorry for coping the things since the system is not accepting the question so I have to do this

if there is any mistakes in the code then please explain it to me

Set the data: option to an object containing the parameters you want to send:

data: { teacher_id: some_variable }

Then in PHP you can use:

$teacher_id = $_GET['teacher_id'];

You should also learn to use a prepared statement instead of substituting the $teacher_id variable directly into the SQL, to prevent SQL injection. See How can I prevent SQL injection in PHP?