I am facing the problem in WordPress. I passed the value from 1st page to 2nd page (here app-2) which shows the result (by using inspector) but when the form is submitted URL shows only
"app-2/?Screens=30"
But
"app-2/?type=app&Screens=30"
is meant to show. Why does this happen? Is it something to do with 'GET' method?
N.B: $_GET['type'] works perfectly.
<form action="app-2/?
type=<?php $type=$_GET['type']; echo $type;?>
&Screens=<?php echo $_POST['Screens'];?>"
method="GET">
<input type="radio" name="Screens" value="3 - 5" required/>
<input type="radio" name="Screens" value="16 - 30" />
<input type="submit" value="submit">
</form>
$_POST['Screens']and appends it to the URL, so afterwards he can access it like$_GET['...']. It doesn't make too much sense though because he has a field with the name 'Screens' aswell that is required.$_POST['Screens']to get the form radio button value and used$_GET['type']to get the previous URL parameter 'type'