Welcome Guest, Not a member yet? Register   Sign In
Just a minor issue!
#2

[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
$this->session->set_flashdata('error_message', 'some_value');
redirect('/register');

then
Code:
if($this->session->flashdata('error_message')) {
  echo $this->session->flashdata('error_message');
};

or you could do it in one function like

Code:
function register() {
   if($this->input->post('submit') !== FALSE) { //user tried registering
            if($this->form_validation->run() === FALSE) {
                     Display errors
               } else {
                    Add user info to database
                    Send success message
               }        
      }
$this->load->view('view_name');
}


Messages In This Thread
Just a minor issue! - by El Forum - 03-04-2011, 04:00 PM
Just a minor issue! - by El Forum - 03-04-2011, 05:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB