How to make filter elements from another page?

Tell me how to implement the filter elements. On one page the items are filtered using select option. What to do to on button click from another page the user got to the page with the filter and activated the desired option and display the items you want. Pages with buttons, translating into the filter several. About the way it looks:

April 4th 20 at 12:58
1 answer
April 4th 20 at 13:00
Solution
A GET request?
page.php?filter=Option1.
We can either using php to handle the filling of the filters or through javascript.
I think using php would be easier.
https://www.php.net/manual/ru/reserved.variables.g...
@Antoinette.Dickinson, more to describe, please. Not sure where to start. - darrell_Greenho commented on April 4th 20 at 13:03
Your link lead to a page with the filters. Right?
Can all the filters pass in a GET-request.
Let's say your page with filters is /filter.php.
Pass need the filter: /filter.php?filter1=2&filter2=3.
Handle php output a select like this:

$filter1Val = $_GET["filter1"]
echo "<select>"
for ($i = 1; $i <= 10; $i++) {
 echo "<option value='".$i."' ";
 if ($filter1Val ==$i){
 echo "selected='true'";}
 echo ">Textbar</option>"
} 
echo "</select>"

For the code strongly do not kick. Php almost do not write. Even no IDE at hand.
Meaning is reduced to the fact that the filter values are passed through the address bar (get-request).
Then have php these headers are processed. - Antoinette.Dickinson commented on April 4th 20 at 13:06

Find more questions by tags AJAXPHPjQuery