Here is a little something i added, there is loads of big search querys in TT which i am trying to remove and came across this which i use currently just for messages

Cant do step by step guide so i added three files test.php and the ajax file, just add database details to database file
Place files in root to see working example and ill go through where to put what

add in css file

#country-list{float:left;list-style:none;margin-top:-3px;padding:0;width:190px;position: absolute;}
#country-list li{padding: 10px; background: #f0f0f0; border-bottom: #bbb9b9 1px solid;}
#country-list li:hover{background:#ece3d2;cursor: pointer;}
#search-box{padding: 10px;border: #a8d4b1 1px solid;border-radius:4px;}


add in header (or with other js)

<script>
$(document).ready(function(){
$("#search-box").keyup(function(){
$.ajax({
type: "POST",
url: "readCountry.php",
data:'keyword='+$(this).val(),
beforeSend: function(){
$("#search-box").css("background","#FFF url(LoaderIcon.gif) no-repeat 165px");
},
success: function(data){
$("#suggesstion-box").show();
$("#suggesstion-box").html(data);
$("#search-box").css("background","#FFF");
}
});
});
});

function userCountry(val) {
$("#search-box").val(val);
$("#suggesstion-box").hide();
}
</script>



PS - if you rename readcountry file you must change the url in the js above url: "readCountry.php",

the form for now i have in mailbox.php for reciever which you can view here https://torrenttrader.uk/messages/create

<input type="text" id="search-box" name="reciever" placeholder="User Name" />
<div id="suggesstion-box"></div>
17dca3ac3633b5bebecde792f5e19e4ce18deb15.data.zip
File missing