Php + ajax implement google search function 2 [original] _ PHP Tutorial

Source: Internet
Author: User
Php + ajax implements google search function 2 [original]. Original Works Original site: www.111cn.cn author: Noodle love rabbit QQ: 271728967 note: Reprint please note that the original www.111cn.cn now let's talk about the post. php file, post. php file //

Original works

Original site: www.111cn.cn

Author: Noodle love rabbit QQ: 271728967

Note: Reprint please explain the original out of http://www.111cn.cn

//
Now let's talk about the post. php file. The post. php file is very simple. it may not be used in php many times, as long as it can be completed at the server foot. {Personal opinion}

Header ("Content-type: text/html; charset = gb2312"); set 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"

";
While ($ rs = mysql_fetch_array ($ result )){
Echo"

  • ". $ Rs ['title']."
  • ";
    }
    Echo"

    ";

    Php + ajax implement google search function 2 [original].

    Http://www.111cn.cn/test/test.html address:

    Http://www.bkjia.com/PHPjc/631913.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/631913.htmlTechArticle// original works site Original: www.111cn.cn author: love rabbit noodles QQ: 271728967 note: Reprint please note that the original out of http://www.111cn.cn // Now let's talk about the post. php file, post. php file...

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.