I’m trying to post this to the update_offer controller.
$.post(site_url+"/offer/update_offer", { variable: 'asdf' },
function(data) {
alert(data);
});
This will will normally return everything perfectly and alert the data. No problems.
The problem occur when I use:
$this->db->where('oID = '.$offer['oID'].' AND oCompanyid = '.$this->session->userdata('company'));
$this->db->update('offers',$offer);
… and it fails. Then it will not return or alert anything.
If I go to the same page with my browser I get “A Database Error Occurred… “, which is just a html page.
Why doesn’t that get returned in the $.post script?
Actualy you shoude use $.ajax to handle request. You woulde be able to make more configuration tought.