Just a minor issue! - 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: Just a minor issue! (/showthread.php?tid=39220) |
Just a minor issue! - El Forum - 03-04-2011 [eluser]Unknown[/eluser] Good day Codeigniter community, I am simply another new member that discovered the potential of this frameworks not so long ago and is now 'abusing' it in his every project, haha. Anyway I would like to hear some opinions about something I want to make. So first thing first, I started on making a registration/signup system. I have a register controller and a function called validateRegistration in it. When the user presses the register button all of his information from the input fields goes through that function obviously. At the end I have an if/else statement to check the results of my form_validation check. Now if I use the $this->load->view('register'); I can display the valiation errors on the page and let the user try again. But the validateRegistration still remains in the URL bar. I tried using the redirect function in the if(not) but it doesn't display the validation errors. So is there any way I can make it work so that it displays the validation errors and the clean url without the function name segment added to it? Thanks in advance. Greetings, Raziel EDIT: If I posted this in the wrong section I am sorry and I gladly ask a moderator to move it to the right section. Just a minor issue! - El Forum - 03-04-2011 [eluser]Mike DeFelice[/eluser] You should be able to do it with session flash data then when you are on the registration page after the redirect see if it exists. Code: check validation then Code: if($this->session->flashdata('error_message')) { or you could do it in one function like Code: function register() { |