[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