Update ossearch.php

Fixes and switch to better support mysqli as well as deleting old useless garbage code.