Question

I have implemented OpenSearch on a website, but the idea is to receive the resulting parameter and then use it to forward to another service. Something like:

  • My opensearch.xml has the URL such as mywebsite/search&q={searchTerms}
  • When I reach mywebsite/search, I need to verify if "q" exists and proceed

I'm trying to print all $_GET and $_POST variables, and "q" is nowhere to be seen.

How can I test if {searchTerms} exists?

Was it helpful?

Solution

mywebsite/search&q={searchTerms}

the url should be

mywebsite/search?q={searchTerms}

or you are not sending valid query parameters then q should be accessible in $_GET['q']

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top