I have text input and html form. where I put users name and submit to get their information. Now I have use ajax to show username.
<div class="hidesearch" id="search" style="width:"400px;">
                 <input type="text"  id="searchbox"  name="user_name" value=""/>
</div>
Problem is when I type text, it shows previous content I submitted in the auto complet options.
What I need is to override the values that shows in the auto-complete and render the names in the auto complete area from ajax call.
 function wpay_search() {
 // echo 'Sasi is  a t est';
    global $wpdb;
    $name=$_POST['user_name'];
    $employee=$wpdb->get_results("SELECT `First_Name` FROM table_list WHERE First_name LIKE '$name%' ");
    foreach($employee as $key=> $value){
     echo '<ul>';
     echo '<li>'.$value->First_Name;'</li>';
     echo '</ul>';
  //   echo $value->post_content;
   }
    //wp_reset_query();
    die();
} // end theme_custom_handler
add_action( 'wp_ajax_wpay_search', 'wpay_search' );
add_action( 'wp_ajax_nopriv_wpay_search', 'wpay_search' );
 
     
     
    