Reputation: 840
I am trying to send a form via get.My point is to reopen the same page, just with another value. So i am at the page.
index.php?url=category
at the site i have a form with the.
action="index.php?url=category"
in the form i have a select with the
name="food".
Now i want the page URL to be like
index.php?url=category&food=1
What should insert at the action value to get to this url? Whatever i try, it changes the url to
index.php?food=1
Upvotes: 0
Views: 58
Reputation: 96271
Submitting a form that has method="get" will override any existing query string with the form values.
The solution is simple: Put the value into a hidden form field, then it will be submitted with the rest of them:
<input type="hidden" name="url" value="category">
Upvotes: 1