How to save sSearch into a session table and reload it when returning to table within the session

How to save sSearch into a session table and reload it when returning to table within the session

homerjsimpsonhomerjsimpson Posts: 8Questions: 0Answers: 0
edited April 2012 in General
I would like to know if it is possible to save the value of sSearch into a session table and reload it afterwards when returning to the same table within the same session.

The idea is something like:
[code]$this->session->set_userdata('searchfield1', $sSearch);[/code]

And on returning on the same table within the same session:
[code]"oSearch" : {"sSearch": $this->session->userdata( 'searchfield1')}[/code]

I'm sure the above is wrong and unfortunately I'm just an aprentice of CodeIginiter, Doctrine and Ajax (all used on the website). Could anyone help me out with this one?

The reason for the above is that after entering a search string on a table it is possible to go to another table. I made a button to return to the previous table but it loads the table without the entered search. However I would like to save the search string in order to return to the same selection.
This discussion has been closed.