You need first to create a HTML form for the search
HTML Code:
<form action="search.php">
<input type="text" name="s" />
<input type="submit" value="Search" />
</form>
Now inside your search.php:
PHP Code:
<?php
// connect to the database
$con = mysql_connect('localhost','username','password');
mysql_select_db('database_name',$con);
//create a search query
$find = $_REQUEST['s'];
$q = "SELECT * FROM `table_to_do_search` WHERE `field1` LIKE '%$find%' or `field2` LIKE '%$find%'";
$result = mysql_query($q);
if(mysql_num_rows($result) > 0)
{
echo '<h1>Results:</h1>';
echo '<ol>';
while($row = mysql_fetch_assoc($result))
{
echo '<li>'.$row['fieldname'].'</li>';
}
echo '</ol>';
}
else
echo 'No results found';
?>
This is just a concept on how it should work.