关于PHP的搜索功能.越简单越好.求大神,该如何解决

WBOY
Release: 2016-06-13 13:31:46
Original
745 people have browsed it

关于PHP的搜索功能.越简单越好.求大神
如题.我想问一下,PHP怎样做搜索功能.越简单越好.求大神
我自己写就是这样:
第一页:





---------------------------------------------
Search.php页:

  • $search=$_POST['search'];
    $sql=mysql_query("SELECT * FROM job WHERE address like '$search'");
    $search1=mysql_fetch_array('$sql');
    echo $search1;
     ?>

  • --------------------------------------------
    求大神指点.
    是不是两个页面都要绑定同一个数据表?

    ------解决方案--------------------
    $sql=mysql_query("SELECT * FROM job WHERE address like '%$search%'");
    $search1=mysql_fetch_array($sql);

    ------解决方案--------------------
    行 的
    Related labels:
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!