Welcome Guest, Not a member yet? Register   Sign In
Undefined property: controller::$session

Hi why do I get this error: (I DO load session library)
Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined property: controller::$session

Filename: controllers/controller.php

Line Number: 23
this is controller
class controller extends CI_Controller {
    public $data;

    public function index()
       $this->load->library( array('session', 'form_validation') );
       $this->load->helper( array('url', 'form') );
       /*LINE 23 */$this->data['flash_login'] = $this->session->flashdata('login');
       $this->load->view('index_view', $this->data);

if I put session and form_validation loading into autoload, everything is OK
What the HECK is going on?

You haven't actually given that a controller a name of 'controller'...have you?


thank you it seems i did.

Theme © iAndrew 2016 - Forum software by © MyBB