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
#2

[eluser]www.sblog.in[/eluser]
what error exactly you are getting
#3

[eluser]Unknown[/eluser]
[quote author="www.sblog.in" date="1404365279"]what error exactly you are getting[/quote]
Here is the error:
Code:
Severity: Notice

Message: Undefined variable: subview

Filename: admin/_layout_modal.php

Line Number: 7
An Error Was Encountered

Unable to load the requested file: .php
I figure that the user class didn't work although I was extends it to Admin_Controller, I don't know why?




Theme © iAndrew 2016 - Forum software by © MyBB