I want to use a button to link to a page. However, the page url is something like domain.com/page?action=register.
I really need this action added to my:
form action="domain.com/page?action=register"
Form attribute, but when I try it with these settings, it will only go to domain.com/page
I’ve tried encoding the ? into %3F but that doesn’t work.
Any help?
The ? values are set by the form, as long as the form’s method is set to “get” (rather than “post”, which doesn’t submit the values in the URL). So, if you want to submit a form to page?action=register, you’d do the following:
It will also pass the other form values along in the URL, creating something like:
EDIT: As @ninetwozero mentioned in a comment, the scenario you describe above should work:
I just tested the above and it passed both the
?action=registerand the form values from my form. So, whichever you prefer.