[Solved] Want to search like that [closed]


This is not a trivial problem, but conceptually you would approach it as follows.

In a text input, call a function every time a user enters a value:

<input class="someClass" id='someId' name="someName" type="text" onkeyup='getProperties(this.value)' >

Where getProperties uses ajax and might look something like this:

function getProperties(value) {
  $.post(
     "somePHPFile.php", 
      {query: value}, 
      function (data) {
        $(".results").html(data);
      }
  );
}

This function sends value (the user input) to somePHPFile.php, which returns data and this data is inserted into the HTML element with class results (which is the ‘live’ results as the user types. As a result, somePHPFile.php needs to contain your call to your database.

solved Want to search like that [closed]