Im trying to use jQuery autocomplete to show my title of news while Im writting on my search form.

But Im having a problem, when Im writing in my search input nothing appears.

I have my header.php file where I have this script to start jQuery autocomplete:

```
$(function(){
  $('.j_autocomplete').autocomplete({
    source: "search.php",   
  });
});

```

I also have in my header.php a menu with a search form:

```
<nav id="menu">
  <ul>  
       <li><a href="">Home</a></li>
       .....
       <li>
         <form id="search">
            <input name="search" class="j_autocomplete" type="text"  placeholder="Search..." />
            <button type="submit">Search</button>
         </form>
      </li>
  </ul>

```

And then I have my source, that is my search.php file, where Im selecting my news title to show on my jQuery autocomplete:

```
<?php

$search= $_GET['term'];
$readNews = $pdo->prepare("SELECT * from news WHERE title LIKE ? ORDER BY title ASC");   
$readNews->bindValue(1, "%$search%", PDO::PARAM_STR);
$readNews->execute(); 

$resJson = '[';
$first = true;

while($res = $readNews->fetch(PDO::FETCH_ASSOC))
{
  if(!$first)
  {
    $resJson .= ', ';
  }
  else
  {
    $first = false;
  }
    $resJson .= json_encode($res['title']);
  }

$resJson .= ']';

echo $resJson;

?>

```

Everything looks fine for me, and If in my search.php file I put only this code below, I get all this 4 names when I start to writing in my autocomplete,
so it seems that my source is also correct:

```
<?php
$result = array("Henry","Tom","Terry","Chris");
echo json_encode($result);
?>

```

Do you see where might be my error? 

In autocomplete documentation says that 'term' is querystring key to use, but
I suspect that is something about my `$_GET['term']` that is not working correctly, but I already tested with `$_REQUEST['term']` and also dont works!