Say in index.html you set variable x to be 5.
You navigate to a different page, lets say pageone.html.
How can you keep x to 5?
And if you change x to 3 on pageone.html, how can you keep it to 3 on pagetwo.html? (the whole website also, every webpage)
Is this possible in javascript or do you need php?
Will give more explanations if needed.
thanks
edit: i did try googling, but i really didnt know how to phrase it for a search so it kinda messed up.
edit 2:
think umm.. like a shop website, you add something to your basket, the basket will say 1 item and will stay like that on every webpage.