[eluser]InsiteFX[/eluser]
You should be using the second parameter of $this->input->post to xss_clean your data before inserting it in to your database tables.
Code:
// insert
$name = $this->input->post('country', TRUE);
// update
$name=$this->input->post('country', TRUE);
$this->db->where('id',$this->input->post('id', TRUE));