Search bar

AusQB

New Member
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.
 

conor

New Member
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'].'%"');
 
Top