Answer the question
In order to leave comments, you need to log in
How to save the state of checkboxes and selects?
Good day. How to save the value of checkboxes and selects when switching between pages? Cookies, localstorage are not suitable because you need the ability to send links to pages. There are no problems with inputs. All values are in the $_GET array
Answer the question
In order to leave comments, you need to log in
<input <?= $_GET["checkboxname"] == "Y" ? "checked='checked'" : "" ?> type='checkbox' name='checkboxname' value='Y'>
change the url when choosing options. And when you click on the link, parse it and mark the selected values.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question