I'm displaying a bunch of questions on a page with checkboxes that then grabs the checked items on form submit. However, when the user goes to the next page, the selections are lost. How do I retain the questions selected in a page when moving to another page before finally submitting?
echo html_writer::start_tag('form', array('action'=> new moodle_url('addquestionpage.php', array('id'=>$id, 'pageid'=>$pageid)), 'method'=>'POST'));
echo $OUTPUT->paging_bar($tquestions, $page, $perpg, $url);