Yeah... So once you hit the submit button, the variable is passed to page1.php. And if you click a link on page1.php that leads to page2.php, the url in the anchor tag would be page2.php?variable=$value ($value is the variable passed from the original form to page1.php)
The problem with your code is that what if someone wants to go from page 2 to page 4? The form code on page 2 submits to page 3, so going to page 4 from page 2 would be impossible. But if you always link to page 4 as page4.php?variable=value (where 'value' would be a variable passed from the previous page), then you can go to page 4 from any page and still pass the variable.
Um... there was probably a much more articulate way to say that. Oh well.