Retaining search variables to return to filtered view |
Hello,
My document management system opens by default to a paged table showing all rows in the documents table. Controller: PHP Code: public function index(){ View: PHP Code: <?php if($dms_documents): ?> The 'Description' column for each row is an href link to that record, and opens - routed via the Controller - an edit form for that record. The edit form allows me to amend/save, ignore or delete the record. The edit form action then returns me to the original table view. That all works fine, but I've now introduced a search form so that the resulting version of the table view is filtered according to the search criteria (currently just a simple 'LIKE'): PHP Code: [code]$data = [ This works, but what I cannot fathom out is how to return from the edit form to a table view reflecting the search criteria (also taking into account any changes made via the edit form) rather than to the full dataset. Thanks
Your answer is to use sessions.
https://www.codeigniter.com/user_guide/l...sions.html (04-23-2024, 03:20 AM)Bosborne Wrote: Your answer is to use sessions. Excellent! Thank you so much - I now understand that I can add the data passed to the table view to the session and recall it as needed. I had previously assumed that sessions were for holding login data etc. Cheers |
Welcome Guest, Not a member yet? Register Sign In |