how can i go by checking if the user has already been to a certain page?
I know has something to deal with session or cookies.
do i populate a session variable array with pages teh user has visited?
You could store an id in a cookie, and link the id back to something on your server which will list all the pages they have been to. Whenever someone visits a page and has this cookie set, you can just look to see if the page they are on is in the list.