Welcome Guest, Not a member yet? Register   Sign In
HMVC: How to use module for dynamic widgets
#9

[eluser]Mark K[/eluser]
Thanks guys. Passing variables is my only solution to redirects. But I feel I'm doing something wrong. I don't know what. Also, that's my other problem. I think loading the view instead of redirecting when login fails is more proper. Like the old fashioned MVC coding below:

Code:
function login() {
    
    $data['error'] = "";
    
    if($this->input->post('submit')){
        /** verify login **/
        redirect('url here');
    } else {
        $data['error'] = "Invalid login";
    }
    
    $this->load->view('login_view', $data); /*** load view instead of redirecting in else ***/
}


Messages In This Thread
HMVC: How to use module for dynamic widgets - by El Forum - 04-07-2014, 12:17 AM
HMVC: How to use module for dynamic widgets - by El Forum - 04-07-2014, 03:15 AM
HMVC: How to use module for dynamic widgets - by El Forum - 04-07-2014, 04:15 AM
HMVC: How to use module for dynamic widgets - by El Forum - 04-07-2014, 06:18 AM
HMVC: How to use module for dynamic widgets - by El Forum - 04-07-2014, 07:04 AM
HMVC: How to use module for dynamic widgets - by El Forum - 04-07-2014, 08:50 AM
HMVC: How to use module for dynamic widgets - by El Forum - 04-07-2014, 11:45 AM
HMVC: How to use module for dynamic widgets - by El Forum - 04-07-2014, 12:32 PM
HMVC: How to use module for dynamic widgets - by El Forum - 04-08-2014, 06:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB