I have to produce a php call which will recognize the final page a person navigate from and display a header connected using the page. Example: User navigates to publish from the first page then header 1 seems, but when the navigate to same publish from page 2 then header 2 is displayed. Any ideas. I'm lost on where you can attempt.

It has been a period since i have last designed in PHP, but $_HTTP['referrer'] (or referer, I am unsure), shows the page the consumer originated from.