I have a site where each page is actually a parameter of the index.php page.
So the search page is simply: www.mysite.com/?p=search
I created a GET form whose action is the page above (http://www.mysite.com/?p=search). However, when I submit the form, it is actually submitting the GET parameters to www.mysite.com/index.php instead of www.mysite.com/?p=search.
How do I get the form to actually submit to www.mysite.com/?p=search so that I end up with something like:
www.mysite.com/?p=search¶m1=blah1¶m2=blah2@¶m3=blah3
instead of:
www.mysite.com/index.php?param1=blah1¶m2=blah2@¶m3=blah3
?
You can’t use a form to make a GET request to a URI with a query string in the action without destroying the existing query string. Use a hidden input instead.
Add
<input type="hidden" name="p" value="search">to your form and setaction="/"