adjusted php to properly pull and parse results based on a search term