Search feature for website

I have searched google but cannot find a good source for this.

I want to add a search box on a website that searches the database and puts the results on a page like results.php or something.

Can anyone lead me in the right direction? Sites made with php and mysql


Are you sure googling something like this doesn’t give you any good source to start working with?

Just catch user input in search field and past it in mysql query… Oh, no, better use PDO for this. And dont forget to verify this input.

As a side note, I never find that these work very well. Even though it’s not as pretty, I prefer to put a Google search form on my sites. You get much more thorough results. E.g.

	<form method="get" action="">
		<label for="q">Search this Site</label> 
		<input type="text" class="text" name="q" id="q" size="31" maxlength="255" value=""> 
		<input class="submit" type="submit" value="Search">
		<input type="hidden" name="sitesearch" value="[COLOR="#FF0000"][/COLOR]">

(Make sure to put your own domain in place of