So I want to store the session in jquery. export_type
is storing all the ids which is checked via checkbox I want to store all those ids in the session. Following is my code , But I have Uncaught SyntaxError: Invalid or unexpected token error. Any help will be appreciated. thanks in advance.
$("#export").click(function () {
var id = [];
$(':checkbox:checked').each(function (i) {
id[i] = $(this).val();
});
var export_type = id;
var set_session = "<?php $this->session->set_userdata('export_type', export_type); ?>";
export_php();
});