I’ve got a page which lists years since 1900 in a select box. When the user changes this, it reloads the page and places the selected value in the URL.
I’m then using PHP to set this as a cookie.
The following section of code gets the cookie IF it’s set otherwise using this current year.
Back down to my list, I’m trying to get the last selected item to show as selected.
The issue is it’s never showing the latest.
Right now, if I select 2019 the page reloads then the previous item is selected.
Change it to 2020 and 2019 shows as selected and is echoed above.
Change it to 1975 and 2020 is shown. If that makes sense.
Why is this?
Here is my code
I keep getting “You do not have permission to do that.” error so can’t post code into here.