When there is no value for parameter "s" , it redirects automatically to homepage. Instead of this , I want to show all the information from my custom sql query. how can i do this??
You can pass
If what you are trying to achieve is to use your search.php template but with "controled" search results, consider using this:
Create a custom search form and use
You can see a live example of a solution similar to this at my site Allt du behöver (unfortunately in Swedish but I think you can figure out how it works anyways).