//
Original work
Original on this site: www.111cn.cn
Author: Noodles Love Rabbit QQ:271728967
Note: Please indicate the source of the reprint http://www.111cn.cn
//
Now let’s talk about the post.php file. The post.php file is very simple. This may not necessarily be done with PHP. It can be done with server scripts. {Personal opinion}
header("Content-type:text/html;charset=gb2312"); I will only talk about this sentence, setting the document encoding.
$key =isset($_POST['key'])?$_POST['key']:'';
$sql ="select title from test where title like '%$key%' order by title desc";
$result =mysql_query($sql) or die(mysql_error());
echo"
php+ajax implements Google search function 2 [Original].
Browse address: http://www.111cn.cn/test/test.html