Ajax post doesn't work

Ajax post doesn't work

Hi, i try to make an ajax type post. I want a form search and enter a food searching in bdd and return the results correspond about the food enter.

  1. <form action="" id="searchForm">
    <input type="text" placeholder="Search..." name="s" id="food">
    <input type="submit" value="Search">
    </form>
    <!-- the result of the search will be rendered inside this div -->
    <div id="result">
    </div>
my script jquery :

<script>
$('#searchForm').submit(function(event) {

// Stop la propagation par défaut
event.preventDefault();

// Récupération des valeurs
var $form = $(this),
term = $form.find( "input[name='s']" ).val(),
url = $form.attr( "action" );

// Envoie des données
var posting = $.post( 'more.php', { s: term } );

// Reception des données et affichage
posting.done(function(data) {
var content = $(data).find('#content');
console.log('valeur ' + term);
$('#result').empty().append(content);
});

});

</script>
And my php file :

I don't understand why it doesn't work can you help me please ?
<?php

$bdd = new PDO('mysql:host=localhost;dbname=chappy', 'root', 'root');
$data = $bdd->query('SELECT * FROM Valnut WHERE Aliment LIKE "%'.$_POST['food'].'%"');

?>
<ul>
<?php while ($a = $data->fetch()){
?>
<li><?= $a['Aliment']. ' | '.$a['Kcal']. ' Kcal' ;?></li>
<?php
}
?>
</ul>