Welcome Guest, Not a member yet? Register   Sign In
question of ajax and CI
#3

[eluser]piranha_swe[/eluser]
I have this code to load a shopping cart

function BuyRecord(id)
{
$("#cart").load("<?php echo $base;?>ajax/ajax_cart.php", { 'recordid':[id] });
}

Then in the ajax_cart.php file I have this at the beginning

$this->load->model(array('Datawork', 'Template', 'Form', 'Process'));
$recordid = utf8_decode($_POST['recordid']);

$recorddata = $this->Datawork->DBGet("records", array(id => $recordid), "", "", "");

I get this result
Fatal error: Using $this when not in object context in ...vinylcatch.se/ajax/ajax_cart.php on line 2

I'm just unsure what I should do, There is no mentioning the ajax_cart file in my controller. I shouldnt load it as a view??


Messages In This Thread
question of ajax and CI - by El Forum - 08-19-2009, 03:41 AM
question of ajax and CI - by El Forum - 08-19-2009, 04:31 AM
question of ajax and CI - by El Forum - 08-19-2009, 04:36 AM
question of ajax and CI - by El Forum - 08-19-2009, 04:49 AM
question of ajax and CI - by El Forum - 08-21-2009, 03:49 AM
question of ajax and CI - by El Forum - 08-21-2009, 04:04 AM
question of ajax and CI - by El Forum - 08-21-2009, 05:08 AM
question of ajax and CI - by El Forum - 08-21-2009, 05:38 AM
question of ajax and CI - by El Forum - 08-24-2009, 03:15 AM
question of ajax and CI - by El Forum - 08-24-2009, 03:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB