I will make a quick description of the problem:
So, i created 2 pages that are linked and on each page there is a 'click here to add 1' button that wouldincrement a variable by 1 (i did this just to get an easier understanding of how to save data when you navigate to another page). When you click that button it alerts the value you currently are at. If i click iton the same page everything works just fine, but when i click the link to the second page and click the button again the counting starts again from 1, but i would like it to continue from the last value that was on the page before.
this is the code:
var $c = 0;