[eluser]Shella[/eluser]
Hello there,
I'm encountering troubles trying to post a textarea content. 37203 characters.
Basically I got a Internal Server Error (500)
I'm sure the issue is related to the long content because if I send a smaller text everything goes fine.
I'm using ckeditor to manage the textarea.
Here codes
View
Code:
...
<textarea name="content" id="content_2" >Example data</textarea>
<?php echo display_ckeditor($ckeditor_2); ?>
...
Controller
Code:
function write_article()
{
if($this->input->post('submit'))
{
$this->load->model('Images_model');
$data['filename'] = $this->Images_model->do_upload();
//$this->load->view('prova', $data);
}
$this->load->library('form_validation');
$this->form_validation->set_error_delimiters('<h4 class="alert_error">', '</h4>');
//field name, error message, validation rules
$this->form_validation->set_rules('title', 'Title', 'trim|required');
$this->form_validation->set_rules('content', 'Content', 'trim|required');
if($this->form_validation->run() == FALSE)
{
$this->create_article();
}
else
{
$this->load->model('articles_model');
if($query = $this->articles_model->create_article($data))
{
$this->edit_article();
}
else
{
$this->load->view('backend_create_article');
}
}
}
Model
Code:
...
function create_article($data)
{
$created_on = date ("Y-m-d H:i:s", time());
$new_article_insert_data = array(
'title' => $this->input->post('title'),
'content' => $this->input->post('content'),
'created_on' => $this->input->post('datepicker'),
'image' => $data['filename'],
'id_category' => $this->input->post('category'),
'created_on' => $created_on,
);
$insert = $this->db->insert('articles', $new_article_insert_data);
return $insert;
}
...
Thanks in advance
Shella