ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Call to undefined method CI_Session::set_flashdata()

November 09, 2009 8:24am

Subscribe [2]
  • #1 / Nov 09, 2009 8:24am

    ranjitbd

    31 posts

    // this is the controller miscellaneous.php
    function feedbackSave()
        {
            $data=array();
            $data['subject'] = $this->input->post('subject', true);
            $data['name'] = $this->input->post('lname', true);
            $data['address'] = $this->input->post('address', true);
            $data['email'] = $this->input->post('email', true);
            $data['mobile'] = $this->input->post('mobile', true);
            $data['comments'] = $this->input->post('comments', true);
            
            $date_time = date('Y-m-d H:i:s');
            $data['date'] = $date_time;
    
            $this->load->model($this->config->item('general_model'), 'save_feedback',TRUE);
            $this->save_feedback->feedbackSave($data);
            
            $this->session->set_flashdata('feedback', 'Feedback send successfully');
            redirect('miscellaneous/feedback');
    
        }
    
    
    // Fatal error: Call to undefined method CI_Session::set_flashdata() 
    // in C:\xampp\htdocs\travelmartbd\application\controllers\miscellaneous.php on line 81
    
    // why?
  • #2 / Nov 09, 2009 8:49am

    n0xie

    1381 posts

    Did you load the session class?

  • #3 / Nov 10, 2009 12:31am

    ranjitbd

    31 posts

    [/code]
    // this is my autoload file
    $autoload[‘libraries’] = array(‘database’, ‘session’, ‘xmlrpc’, ‘table’, ‘rapyd’, ‘dml’);
    // anything else for loading the session class
    [/quote]

  • #4 / Nov 10, 2009 1:52am

    InsiteFX

    6819 posts

    Try loading the session library in your controller and take it out of autoload.

    See if that works.

    Enjoy
    InsiteFX

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases