set_message Dysplay - 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: set_message Dysplay (/showthread.php?tid=51656) |
set_message Dysplay - El Forum - 05-12-2012 [eluser]Gabi3xz[/eluser] Example have code Code: $this->load->library('form_validation'); Code: $this->form_validation->set_message('success_login', 'Login success'); What is not correct? set_message Dysplay - El Forum - 05-12-2012 [eluser]vrencianz[/eluser] The set_message() function is used to display error messages (See http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html#settingerrors for setails). To display a success message 1) You can use the success page or: 2) Create two helper functions (in a file helpers/utils_helper.php, for example) Code: /** 3) On success call <b>set_feedback('Login success');</b> 4) Somewhere in your view insert Code: <?php if($feedback): ?> 5) load your view Code: $this->load->helper('utils'); I hope this helps. set_message Dysplay - El Forum - 05-12-2012 [eluser]Gabi3xz[/eluser] Thanks, now I understand |