Using javascript and $_SESSION's to record wanted user information over pagination
<p>What I have so far is a paginated page, showing all users in a database system. Each page shows 30 users and has a checkbox next to each user, what I need is a way for users to select and deselect these users and for these selections to propagate through, so if the user goes back to page 1 from page 2, all users from page 1 will still be checked.</p>

<p>I also need a way to record this information, so that once the user has looked at all the pages and clicks a submit form all checked users information can be processed. I am thinking of using javascript to record the information and php sessions to store it, but with the way I am trying now, when a user clicks a checkbox, it is not ticked.</p>

<p>Does anyone have a better way of doing this/see how I can fix this problem?</p>

<p>Thanks.</p>

<pre><code>&lt;script type="text/javascript"&gt;
function log_export($str) {   
document.check.data.value = $str;
document.check.submit();
}
&lt;/script&gt;

&lt;?php
if(isset($_POST['data'])) {
    echo $_POST['data'];
}
?&gt;

&lt;form name="check" method = "post" action = ""&gt;
&lt;input type="hidden" name="data"&gt;
    &lt;input type="checkbox" name="A" onclick="log_export('1')" /&gt;
    &lt;input type="checkbox" name="B" onclick="log_export('2')" /&gt;
    &lt;input type="checkbox" name="C" onclick="log_export('3')" /&gt;
&lt;/form&gt;
</code></pre>
