Search bar

Discussion in 'Scripts' started by AusQB, May 3, 2009.

to remove all ads.
  1. AusQB

    AusQB New Member

    Messages:
    167
    What is the best way to implement a search bar? JQuery? PHP?

    If anyone could point me towards some useful resources I'd appreciate it.

    I have the form all laid out, but I just need the script to perform the search.
     
  2. emopoops

    emopoops Banned

    Messages:
    66
    i dont know. i think there is a search bar to implement when u google it. they give u it
     
  3. conor

    conor New Member

    Messages:
    348
    Well if all of the content of your website is stored in a database then it is quite easy. Just create a normal HTML form like this:

    Code:
    <form method="post">
      <input type="text" name="content"/>
      <input type="submit" name="search" value="search"/>
    </form>
    
    Then create a mysql query to search the results:

    Code:
    mysql_query('select * from table where name like"%'.$_POST['content'].'%"');
     

Share This Page