Welcome Guest, Not a member yet? Register   Sign In
tutsplus Build a CMS in CodeIgniter
#1

[eluser]Unknown[/eluser]
I follow this tutorial to the step create login form, I got a same problem with the author in load _layout_modal and he fixed by added $this->load->view('admin/_layout_modal', $this->data); but for me it wouldn't budge.
Code:
class User extends Admin_Controller {

public function __construct()
{
  parent::__construct();
}

public function login(){
  $rules = $this->user_m->rules;
     $this->form_validation->set_rules($rules);
  if ($this->form_valiadtion->run() == TRUE) {
   // We can login and redirect.
  }
  $this->data['subview'] = 'admin/user/login';
        $this->load->view('admin/_layout_modal', $this->data);
}
}
I added data['subview'] to Admin_Controller then it could load _layout_modal but the form couldn't validate. Do you have any idea?

SOURCE


Messages In This Thread
tutsplus Build a CMS in CodeIgniter - by El Forum - 07-02-2014, 06:12 PM
tutsplus Build a CMS in CodeIgniter - by El Forum - 07-02-2014, 10:27 PM
tutsplus Build a CMS in CodeIgniter - by El Forum - 07-03-2014, 01:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB