I have a form that receives the minimum size and maximum size of shoes from the user and prints all shoes with this size range on the same page with the POST method.
The action of the form leads to the same page, so the page is updated and receives new values ββfor the POST variables.
My problem is that the default selection option (for example)
<option value="49.0" selected="selected">49.0</option>
still selected after refreshing the page, so it prints the results for size X, but the selected option is 49.0
My question is how to change the default setting to the one that the user selected before he submitted the form or, in other words, to $ _POST ['minSize'] and $ _POST ['maxSize']
source share