This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

AJAX PHP

Start typing a name in the input field below:

Suggestions:

// script from the head
<script>
function showHint(str) {
  if (str.length == 0) {
    document.getElementById("txtHint").innerHTML = "";
    return;
  } else {
    var xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = function() {
      if (this.readyState == 4 && this.status == 200) {
        document.getElementById("txtHint").innerHTML = this.responseText;
      }
    };
    xmlhttp.open("GET", "include/scripts/php/gethint.php?q="+str, true);
    xmlhttp.send();
  }
}
</script>

// from the input element
onkeyup="showHint(this.value)"

The contents of the "gethint.php file