I'm working on a PHP application where users can filter search results based on 4 different categories. Switching a category affects the GET variable page_type
.
In my case, the fields for each category need to stay the same while navigating pages (they are stored in session variables), however if page_type
changes, then the session variables need to be unset so that the user doesn't need to spend time deleting all the old data from the last category.
Can someone help me figure out a way to compare an old GET variable against a new one? If this is not possible, then is there an efficient way to achieve what I am trying to do?