Not showing any data from php into ajax. Any help would be appreciated.
HTML:
Search Box:<input type="text" name="search" id="search">
<div id="search1"></div>
AJAX:
$("#search").keyup(function(){
var search=$(this).val();
$.ajax({ //GR ID Generation
method: "GET",
url: "search_rep.php?invo="+search,
})
.done(function( msg ) {
$("#search").html(msg);
$("#search1").val();
});
PHP:
$in = mysql_real_escape_string($_GET['invo']);
$msg = '';
if(strlen($in) > 0 && strlen($in) < 20){
$row = mysql_query("SELECT Bot_Name
FROM bot_info
WHERE Bot_Name
LIKE '%$in%'and Bot_Type='Printed'",$con );
while($result = mysql_fetch_array($row)){
$msg .= $result['Bot_Name'] . "<br />";
}
}
Output should be shown as google search engine once You type a word automatic all sentences are shown regarding to that word.