Hi i am trying to update my existing data in my database using ckeip jquery plugin in codeigniter. I am able to update my data in the database. but when i refresh my page, the database field again shows the value of zero. i dont know y it is happenig.
Can you please explain that.. if i have another div to update using ckeip than how i should tel php script to update only this particular script
Thanks
=================here is the my model code==================
function get(){
$query = $this->db->select('content')->from('about')->where('id', 1)->get();
return $query->result();
}
function update_abx(){
$up_data = array('content' => $this->input->post('content'));
$this->db->where('id', 1);
$this->db->update('about', $up_data);
}
==================here is my controller code===============
function index(){
$data['paste'] = $this->test->get();
$this->load->view('index_view', $data);
}
function abc(){
$query = $this->test->update_abx();
$this->load->view('index_view');
}
==================this is my view file code================
<div id="editable" name="sample">
<?php
foreach($paste as $row){
echo $row->content;
}
?>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('#editable').ckeip({
e_url: 'site/abc',
});
});// enf of the document ready function