tweaks

tweaked the search page and the corresponding function in db.php