What if you set query parameters in the action attribute of an HTML form?
Let us find out.
<form action="https://show.ratufa.io?ref=contact&type=query" method="post"> ... ... </form>
Here we have two query parameters in the action attribute of the form.
Let us try doing it:
If we try entering some values and submitting the form above, you will see that the server side does receive the query parameters
How do you get the query parameters on the server side? Well, that depends on the server-side zscripting language you use.
In the case of PHP, the
$_REQUEST super global will get you both the fields from the form as well as the query parameters.
$_GET will get you just the query parameters.