How can I get a views exposed filter to persist across multiple views? I have 2 separate views that return a set of results for each of my content types. The fields are different, but the filters are exactly the same - Sort by Location / Distance. This Distance / Proximity filter is exposed, and it is set to 'remember' the last entry. I followed the tutorial here http://drupal.org/node/359463 to be able to filter results by distance. It works great.

In views, to remember the last entry, Views uses sessions. But, each view has its own individual $_SESSION variable. That means what I set for one view does not carry over to the next, and even each view can have different values, which is not what I want. Here is a dump of the session after they have been set:

[views] =&gt; Array
    (
        [search_pages] =&gt; Array
            (
                [default] =&gt; Array
                    (
                    )

            )

        [baby_clothes_pages] =&gt; Array
            (
                [default] =&gt; Array
                    (
                        [distance] =&gt; Array
                            (
                                [postal_code] =&gt; 11211
                                [search_distance] =&gt; 100
                                [search_units] =&gt; mile
                            )

                    )

            )

        [baby_gear_pages] =&gt; Array
            (
                [default] =&gt; Array
                    (
                        [distance] =&gt; Array
                            (
                                [postal_code] =&gt; 22343
                                [search_distance] =&gt; 100
                                [search_units] =&gt; mile
                            )

                    )

            )

    )


What I would like to do is create a small module or snippet of code that will simply allow someone to type in their 5 digit zip code and then it update all the values across all my pages with this filter. If it is changed on any page, then it changes it for the rest of the pages as well. It also needs to work so that it affects the results on the next page load so that it correctly shows them filtered.

Here is a snippet of code I was experimenting with to try to set this value, but it's the wrong direction.

 $all_views = views_get_all_views();            // get an array of all views in use on the site

foreach ($all_views['category_pages']-&gt;display as $key =&gt; $value) {
 //check to see if the structure exists I am looking to modify
if(array_key_exists('postal_code', $all_views['category_pages']-&gt;display[$key]-&gt;display_options['filters']['distance']['value'])) {

//if so, set its value
$all_views['category_pages']-&gt;display[$key]-&gt;display_options['filters']['distance']['value']['postal_code'] = '28152';

//try setting the session instead
$_SESSION['views']['category_pages'][$key]['distance']['postal_code'] = '28152';
    }


What's the correct direction? How do I get this value changed? Could it be done in the template.php file with preprocess function? Should I do it in a module, and if so, what do I need to alter?

Very lost at this point. Thanks for the direction!
It sounds like you would need to save the value somewhere. Next when a page load event happens (on any page of your site) you need to load the value into the field. I think you might need to create a cookie to do this.