jQuery UI autocomplete allows the user to select an item from the suggestion list based on the typed value.
You can load the suggestion list with and without AJAX.
In this tutorial, I show how you can add jQuery UI autocomplete on your page and load PostgreSQL database data using AJAX and PHP.