Is it possible to add values to SESSION w/ jQuery
<p>I have a form with many rows of items, each line with checkbox that has item's ID.</p>

<p>I need to take item ID and add it to php $_SESSION when a single checkbox or all checkboxes selected (REMOVE FROM SESSION IF UNCHECKED). Currently I have the following code to select all checkboxes:</p>

<pre><code>var checkboxes = $(".chkbx").change(function() {
    var allIsChecked = checkboxes.length === checkboxes.filter(":checked").length;
    all[0].checked = allIsChecked;
    enableMyElement(checkboxes.filter(":checked").length &gt; 0);
    putInSession($(this).val());
});
var all = $("#checkall").change(function() {
    checkboxes.attr("checked",this.checked);
    enableMyElement(this.checked);
});

function putInSession(id) {
    $.ajax({
        url: actions.php,
        type: "POST",
        data: "action=addToSession&amp;ID="+id;                 
    });
}   

&lt;input id="checkall" type="checkbox"&gt;
&lt;input class="chkbx" type="checkbox" value="360" name="delCont[]"&gt;
&lt;input class="chkbx" type="checkbox" value="500" name="delCont[]"&gt;
&lt;input class="chkbx" type="checkbox" value="510" name="delCont[]"&gt;
</code></pre>

<p>How do I update my PHP session with jQuery? Is it even possible? What are the alternatives?</p>

<hr>

<p>UPDATE:</p>

<p>OK, Ajax is clearly the way to go. Added new function putInSession(). Still not clear how to integrate with my SelectAll fnctionality...</p>
