well, I dont think cookies expire on browser close, sessions do. You could either to do what you want.
but to set cookies all you do is (before any scripts)
setcookie ("cookiename", $variable, thetime);
usually, for time I put time()+time();, that's for alot of time, but it goes by seconds so if you want a cookie to expire in five minutes, you'd go:
setcookie ("cookiename", $variable, time()+300);
when the page reloads a variable called $cookiename will be available. On either page one or two.
Sessions work like this: at the beginnign of the page you put
session_start();
and you load your variables:
session_register("viewed"); no $ sign
when you go to page two, you should have a $viewed variable available if you also do a session_start() on top of that page.