Tweaked id search on php; fixed search paging

Was retaining the offset even if you typed in a new search term. Now it
resets if the search term is new. Also stopped searching for IDs when
the only IDs were “OTHER”