CodeIgniter Forums
troubles using session - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: troubles using session (/thread-4758.html)



troubles using session - El Forum - 12-13-2007

[eluser]plainas[/eluser]
I am trying to initialize the session as described on the manual...


This is my code

Code:
<?php
class Query extends Controller {
    
    var $action_url;
    var $search_sites;
    
    function Query(){
        $this->load->library('session');

. . .

can anybody tell me what I am missing here?

I am getting this error:

Fatal error: Call to a member function library() on a non-object


troubles using session - El Forum - 12-13-2007

[eluser]Armchair Samurai[/eluser]
You need to place parent::Controller; in your constructor. Take a look at the User Guide specifically the part about class constructors.


troubles using session - El Forum - 12-14-2007

[eluser]plainas[/eluser]
Thank you.

dummy me