![]() |
edit item using pagination - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: edit item using pagination (/showthread.php?tid=25499) |
edit item using pagination - El Forum - 12-14-2009 [eluser]gibbo1715[/eluser] All I have got a list of my entries in my database restricted via pagination I have a link to edit items as follows Code: foreach($query as $row){ This is what i use to goto the item i want to edit and I have been using Code: redirect('/books/main/', 'refresh'); to get back to my list Now as far as i can tell pagination uses $this->uri->segment(3) to identify what page of the list to display but i have now gone to my edit page and there for the segment 3 represents the id number of the record i want to update How would i go about getting it to return to the correct page in my list after an edit? thanks Gibbo edit item using pagination - El Forum - 12-14-2009 [eluser]gibbo1715[/eluser] I tried using sessions which works for me as follows but keen to know if this is the correct way thanks gibbo $this->session->set_userdata('page', $this->uri->segment(3)); redirect('/books/main/' .$this->session->userdata('page'), 'refresh'); |