![]() |
Basic Login System - 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: Basic Login System (/showthread.php?tid=23368) |
Basic Login System - El Forum - 10-08-2009 [eluser]Unknown[/eluser] Hi all, I'm starting off developing a cms, but there's a few questions i had: 1.i know from a view, you would just use set_value ( 'username' ) to output the value back out, but in the controller, do i use set_value as well? 2.how would you set an error message to show up without creating a callback that would inevitably run when you form_validation->run();? I see form validation as a 2 step validation: first validate without the db, then check against the db ( see code ) Code: <?php Thanks in advance, Basic Login System - El Forum - 10-08-2009 [eluser]imn.codeartist[/eluser] In your controller set your error message in session Code: $this->session->set_flashdata('msg','your message'); in your view Code: if($this->session->flashdata('msg')) this will set error message in the session and once it print it flushes itself |