Save selection

We need to implement a script that works on the principle of selecting templates on many portals and forums, i.e. choose from the list selects 1 or 2 and is written to the session or cookies or cache your choice where the thread is saved, and on each visit (whether he left the browser or not) so that his choice is saved, how to do this? on an example if possible… (and the name of the variable so that you can use it 🙂 )

Answer 1

Well, you yourself said “save in cookies”, what prevents you from seeing how these very “cookies” are created . You pass the template ID in the cookie, and every time the site loads, you check it and apply the desired template.