无法获得后期价值

i have problem with the post value in my form

i show you my code and see if you can help me

<script src="//netsh.pp.ua/upwork-demo/1/js/typeahead.js"></script>
<script>
  $(document).ready(function() {
      $('#ville').on('change', function(){
          var id_ville = this.value;
           $.ajax({
               type: "post",
               url: "lycee.php",
               data: 'id_ville=' + id_ville,
               success: function(result){
                    $("#lycee").html(result);
                }
            });

            $('input.lycee').typeahead({
                name: 'lycee',
                remote: 'lycee.php?query=%QUERY'
            });
        });
    })
</script>
<script >

and this is my php part code

$id_ville = mysql_real_escape_string($_POST['id_ville']);

if($id_ville!='') {
    if (isset($_REQUEST['query'])) {
        $query = $_REQUEST['query'];
        $sql = $conn->query ("SELECT nom_lycee 
            FROM ville_lycee   
            INNER JOIN ville ON ville.id_ville = ville_lycee.id_ville 
            INNER JOIN lycee ON lycee.id_lycee = ville_lycee.id_lycee 
            WHERE ville.id_ville = '" . $id_ville . "' 
                AND lycee.nom_lycee LIKE '%{$query}%' ");

        $options = "<label value=''></label>";
        $array = array();

        while ($row = $sql->fetch_assoc()) {
            $array[] = array (
               'label' => $row['nom_lycee'],  
                'value' => $row['nom_lycee'],
            );
        }

        echo json_encode ($array);
    }
}

the problem is that i need the id_ville value first and then the Query to filtre