[eluser]developer_rtpl[/eluser]
Refresh Problem cant be solved by the previous suggestions. Here I m giving snipplet of my code i.e
function edit_product()
{
$id=$this->uri->segment(3);
$edit['edit_product_query']=$this->db->get_where('products',array('id'=>$id));
if($id!='')
{
$this->load->view('edit_product',$edit);
}
if(isset($_POST['submit']))
{
$product_update = array(
'name' =>@$_POST['name'],'description' =>@$_POST['description'],'category_id' =>@$_POST['category_id'],
'list_price' =>@$_POST['list_price'],'base_price' =>@$_POST['base_price'],'special_price' =>@$_POST['special_price'],'last_received_cost' =>
@$_POST['last_received_cost'],'average_usage'=>@$_POST['average_usage'],
);
$id= $_POST['id'];
$this->db->where('id', $id);
$this->db->update('products', $product_update);
//$this->load->view('welcome_company_admin');
redirect('company_admin/view_product');
//$this->load->view('view_product');
}
}
i use this code for updating the records. They get updated and visible on 'view_products' page only after I refresh that particular page.Otherwise it shows old record(i.e without updation record)to me.