Hi for all.
I need help for this situation:
After insert in the database, i need show to user mode of impress the page redirecting to samecontroller/print.
I add in the grocery crud this code:
$crud->callback_after_insert(array($this, 'log_user_after_insert'));
$crud->set_lang_string('insert_success_message',
' Mode Print.
<script type="text/javascript">
window.location = "'.site_url(strtolower(__CLASS__).'/'.'print').'/'.$this->session->userdata('primarykey').'";
</script>
<div style="display:none">
'
);
In the funcion of callback:
function log_user_after_insert($post_array,$primary_key)
{
$this->session->set_userdata('primarykey', $primary_key);
return true;
}
But don't works.
Any help?
Thanks a lot !
Sorry for the poor english.