Mobile - view full site after mobile redirect
===

I already have code which redirects users to the mobile site by detecting which device they are using.  IMPORTANT: that means the mobile site and the full site have the same URL: http://example.com.  There isn't a m.example.com or mobile.example.com--- just example.com

    function _check(){

        $agent = $_SERVER["HTTP_USER_AGENT"]; 
		   
        $mobile = false;
        $agents = array("Alcatel", "Blackberry", "HTC",  "LG", "Motorola", "Nokia", "Palm", "Samsung", "SonyEricsson", "ZTE", "Mobile", "iPhone", "iPod", "Mini", "Playstation", "DoCoMo", "Benq", "Vodafone", "Sharp", "Kindle", "Nexus", "Windows Phone");
        foreach($agents as $a){
		 
            if(stripos($agent, $a) !== false){                 
                return $a;
            }
			
        }
        return $mobile;
    }

Now  I want to create a link that, once clicked, will set he $mobile variable to false so that the full site will be shown rather than the mobile site (because both have the same URL).

Does anyone have an idea of how to detect when a link is clicked, to set the $mobile variable to false?

Thanks in advance.
