How to disable automatic page updates?

I'm writing a site where there is a need to sort the blocks, for example, for the price, but that would work with double sorting or more, the site is updated and one of the filters is not working.
<form action="" method="POST">
 <input type="submit" name="all" value="All<?php echo $all; ?>" >
 <input type="submit" name="male" value="Men's clothing<?php echo $male_select; ?>">
 <input type="submit" name="female" value="Women's clothing<?php echo $female_select; ?>">
 <input type="submit" name="gift" value="Souvenirs<?php echo $gift_select; ?>">
<br / >
 <form action="" method="POST">
 <input type="submit" name="hight_cost" value="High price<?php echo $h_c; ?>">
 <input type="submit" name="low_cost" value="Low price<?php echo $l_c; ?>">

What else do you need to show? Code?
Just for these sorts, I use variables in the file index.php that are sent to another code product_out.php
April 4th 20 at 00:58
2 answers
April 4th 20 at 01:02
April 4th 20 at 01:00
The php code runs on the server side, and You want to sort worked on the client side without reloading the page. You need to write js on the front part, which will deal with receiving and sending data without reloading the page (ajax) and related to this endpoint on the server side (php).

Find more questions by tags PHPHTML