[eluser]gbar[/eluser]
Hello, thank you everyone for your useful answers. I solved with the suggestion of Alur, that way the thing works perfectly as I want.
I just have to solve a small problem when I want to undo the effects of research, and then return to displaying all records in the table.
I think the correct behavior is to click again on the button of the form, with the search field blank.
Has no effect, the search area is repopulated by the previous term, and then restart the search. In practice this code, which would be the most natural, does not work:
Code:
if ($this->input->post('search')) {
$data = array(
'search' => $this->input->post('search'),
'field' => $this->input->post('field')
);
$this->session->set_userdata($data);
}
if($this->input->post('search') == '')
{
$this->session->unset_userdata('search');
$this->session->unset_userdata('field');
}
While if I write this:
Code:
if ($this->input->post('search')) {
$data = array(
'search' => $this->input->post('search'),
'field' => $this->input->post('field')
);
$this->session->set_userdata($data);
}
if($this->input->post('search') == 'delete')
{
$this->session->unset_userdata('search');
$this->session->unset_userdata('field');
}
and then I type the word 'delete', but it could be any other word, I get the desired effect. Maybe I should put as the ascii code of a null or something.
Thanks anyway to all.
p.s. for InsiteFX, I updated the table