Check query then redirect - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Check query then redirect (/showthread.php?tid=9260) |
Check query then redirect - El Forum - 06-18-2008 [eluser]bennyhill[/eluser] I have a link that deletes a db record. How would I check if the record was deleted successfully then redirect them back to the View they were on? Is this the ideal spot to use Sessions? Check query then redirect - El Forum - 06-18-2008 [eluser]Armchair Samurai[/eluser] Use $this->db->affected_rows() after you delete the record, then redirect based on the result. Check query then redirect - El Forum - 06-18-2008 [eluser]bennyhill[/eluser] But how do I know what view to load? |