Welcome Guest, Not a member yet? Register   Sign In
Posting a too long textarea
#1

[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


Messages In This Thread
Posting a too long textarea - by El Forum - 01-15-2013, 05:00 PM
Posting a too long textarea - by El Forum - 01-15-2013, 06:13 PM
Posting a too long textarea - by El Forum - 01-15-2013, 11:00 PM
Posting a too long textarea - by El Forum - 01-16-2013, 04:02 AM
Posting a too long textarea - by El Forum - 01-16-2013, 04:03 AM
Posting a too long textarea - by El Forum - 01-23-2013, 05:57 PM
Posting a too long textarea - by El Forum - 01-23-2013, 07:01 PM
Posting a too long textarea - by El Forum - 01-24-2013, 08:24 PM
Posting a too long textarea - by El Forum - 01-25-2013, 08:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB