Welcome Guest, Not a member yet? Register   Sign In
weird bug in my app
#1

[eluser]Iwasignited[/eluser]
Hi all
Here is the code, please let me know what im doing wrong

controller:
Code:
function add_comment($entryID)
    {
        $is_logged_in = $this->is_logged_in();
        $user_id = $this->user_id();
        $this->load->model('entry_model');
        // If the user is not logged in yet, redirect him and send a message
        if(!isset($is_logged_in) || $is_logged_in != true)
        {
            $this->session->set_flashdata('msg', 'You have to login to add comment');
            redirect('site/index');    
            
        }        
        // A not real entry
        if (!$this->entry_model->getDetails($entryID))
        {
                $this->session->set_flashdata('msg', 'Not real entry');
                redirect('site/index');
        }
        // If ok, show the add comment page
        $data['main_content'] = 'add_comment';
        $data['user_id'] = $user_id;
        $data['entry_id'] = $entryID;
        $this->load->view('includes/template', $data);
    }

I receive this error when going to a not real entry
Quote:A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\CMS\application\models\entry_model.php:190)

Filename: libraries/Session.php

Line Number: 662
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\CMS\application\models\entry_model.php:190)

Filename: helpers/url_helper.php

Line Number: 541


Please help me


Messages In This Thread
weird bug in my app - by El Forum - 03-05-2010, 09:17 PM
weird bug in my app - by El Forum - 03-05-2010, 09:51 PM
weird bug in my app - by El Forum - 03-06-2010, 10:36 AM
weird bug in my app - by El Forum - 03-06-2010, 11:33 AM
weird bug in my app - by El Forum - 03-06-2010, 11:51 AM
weird bug in my app - by El Forum - 03-06-2010, 11:57 AM
weird bug in my app - by El Forum - 03-06-2010, 12:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB