Author Topic: Advanced Search Links  (Read 3481 times)

0 Members and 1 Guest are viewing this topic.

Offline ombra

  • Pre-Newbie
  • Posts: 5
    • View Profile
Advanced Search Links
« on: January 01, 2007, 12:59:41 AM »
This seems like it would be really easy but I'm stumped.  I'd like to make a section on my site that has links to searches.

I know how to link to a basic search: 
mywebsite.com/search.php?search_keywords=keyword1

The problem is that I'd like some of the searches to contain more than one keyword and to only return results if BOTH keywords are there. 

Some of the links I've tried are:
mywebsite.com/search.php?search_keywords=keyword1&keyword2
mywebsite.com/search.php?search_keywords=keyword1&&keyword2
mywebsite.com/search.php?search_keywords=keyword1+keyword2

These almost work, but isn't quite there yet.  It will still return results if there is keyword1 but no keyword2.

I'm finding what I want by going to advanced search and filling the dot by AND, but since that search doesn't show the address I can't figure out how to link results.

Offline ombra

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: Advanced Search Links
« Reply #1 on: January 01, 2007, 01:43:02 AM »
Okay I found it buried in a thread after going through 6 pages of unrelevant search results.  I'm reposting here in case someone else wants to do this.  Easy solution but I never would have guessed it... I'm not used to having links with spaces.

You can do searches by typing the word "and" directly into the link:
mywebsite.com/search.php?search_keywords=keyword1 and keyword2

Which will appear in the address bar like this when the results come up:
mywebsite.com/search.php?search_keywords=keyword1%20and%20keyword2


Offline getcom

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Advanced Search Links
« Reply #2 on: September 07, 2007, 01:18:57 PM »
Do you think it is possible to add say 3 dropdown list for the keyword1 keyword2 and weyword3 and have the search look for all 3 keywords