[color="#1C2837"][size="2"]Go from [/size][/color]page0 [color="#1C2837"][size="2"]to [/size][/color]page1 [color="#1C2837"][size="2"]is HTTP Request 1 - Refferer is [/size][/color]page0
Go from page1 to page2 is HTTP Request 2 - Refferer is page1
[color="#1c2837"][size=“2”]Go back from page2 to page1 is HTTP Request 3 - Refferer is page2 - This is not mistake because HTTP is stateless protocol, and it can’t know that user at some point in the past went from page0 to page1. [/size][/color]
[color="#1c2837"][size="2"]Use $_SESSION array to resolve your issue.[/size][/color]