So, whenever the user chooses "hightolow" and "1", it normally redirects to sortby=hightolow&availability=1. However, if a user changes availability to 0, it redirects to the FIRST of sortby and availability=0 (sortby=lowtohigh&availability=0)
I want the selected option to stay as it got chosen by the user (i.e: sortby=hightolow&availability=0), what's the best solution? Thanks.
I use express.js (node.js) as a back-end solution.
<form method="GET" onchange="submit()">
  <label>Sort By</label>
  <div>
    <select name="sortby">
      <option value="lowtohigh">Price (Low to High)</option>
      <option value="hightolow">Price (Low to High)</option>
      <option value="new">Newest</option>
    </select>
  </div>
  <label>Availability</label>
  <div>
    <select name="availability">
      <option value="1">Available</option>
      <option value="0">Out of Season</option>
    </select>
  </div>
</form>
 
    