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

[eluser]8andrej8[/eluser]
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
Code:
class controller extends CI_Controller {
    
    public $data;

    public function index()
    {    
       $this->load->database();  
       $this->load->model('model');
       $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);
    }
#2

[eluser]8andrej8[/eluser]
if I put session and form_validation loading into autoload, everything is OK
What the HECK is going on?
#3

[eluser]JonoB[/eluser]
You haven't actually given that a controller a name of 'controller'...have you?

http://ellislab.com/codeigniter/user-gui...names.html
#4

[eluser]8andrej8[/eluser]
thank you it seems i did.




Theme © iAndrew 2016 - Forum software by © MyBB