Welcome Guest, Not a member yet? Register   Sign In
Refresh Problem
#1

[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.
#2

[eluser]Thorpe Obazee[/eluser]
could you use the tags?
#3

[eluser]Dam1an[/eluser]
[quote author="bargainph" date="1242900287"]could you use the tags?[/quote]

You didn't include any spaces, so it actually attepmted to render the [ code ] tags Tongue
#4

[eluser]Thorpe Obazee[/eluser]
[quote author="Dam1an" date="1242910041"][quote author="bargainph" date="1242900287"]could you use the tags?[/quote]

You didn't include any spaces, so it actually attepmted to render the [ code ] tags Tongue[/quote]

lol. I forgot about that. Noted.
#5

[eluser]TheFuzzy0ne[/eluser]
You can also just use [code][/code] which renders like this [code][/code]
#6

[eluser]Thorpe Obazee[/eluser]
yeap that's what I do with <script> thanks for that [ reference




Theme © iAndrew 2016 - Forum software by © MyBB