I am performing the jquery POST correctly, however I would like to call another PHP function inside the controller. EDIT The code below works fine....I'm just an idiot. Someone close this please.
Here is the setup:
class controller extends CI_Controller {
function con1() {
//retrieve post variable
$this->con2()
}
function con2() {
//do something
$this->my_model->get_results() //fails
}
}
Jquery POSTS to con1
, however it will fail when i do $this->con2()
. Is there anyway I can get this to work? Also, is it possible to call a model once jquery posts the data?
Thanks