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:
<form method="post">
<input type="text" name="content"/>
<input type="submit" name="search" value="search"/>
</form>
Then create a mysql query to...