Yesterday i coded a form checkbox to set a PHP Session variable on tpl_shopping_cart_default.php. i used jQuery and Ajax to do so. below is the code.

the problem is that the variable $_SESSION['hm-agreement'], is disappearing on subsequent pages, like for ex: tpl_shopping_cart_default, or log-in etc. i do a var_dump($_SESSION) to check this.

in the code below i've even echoed out the the SESSION var in a callback function via a js alert and it is echoing back correctly.

PHP Code:
$(document).ready(function(){
    $(
'input:checkbox').click(function(){
        if(
this.checked) {
            
state 'checked';
        } else {
            
state 'unchecked';
        }
        $.
get('pyro-agreement.php', {action:state}, function(data) {alert(data); })
    }); }) 
am hesitant to supply a link to the dev. site here but could do so privately.
i did a little study to test the code in a simpler environment and seems to be working as expected.

http://tomcarden.net.previewdns.com/...tudy/intro.php

any help on this would be appreciated. i don't understand why the variable once created doesn't exist on sub-sequent pages. i've