Welcome Guest, Not a member yet? Register   Sign In
form validation and log-in
#1

[eluser]dwlamb[/eluser]
I'm m new to CI and am adding a log-in/authentication add-on to my application called SimpleLoginSecure. This particular add-on does not have any forms, which is ok for I'll create my own.

I am having a challenge with the logic of form validation and steps after the form is submitted. From the form validation tutorial, there's this key ingredient

Code:
if ($this->form_validation->run() == FALSE) {
    $this->load->view('welcome_login', $data);
}
else {
    $this->load->view('formsuccess');
}

For my log-in, there's this simple function:
Code:
function login()
{
    $this->simpleloginsecure->login('[email protected]', 'uS$rpass!');    
}

Is it necessary to load a formsuccess once validation is TRUE or can I direct CI to go to function login() ?




Theme © iAndrew 2016 - Forum software by © MyBB