[eluser]jacobson[/eluser]
ok but response is responsible only for alerting that it worked but I can see in phpmyadmin that there are no records.
I've changed my code:
view:
Code:
function enroll(id){
$.post(
'http://localhost/index.php/main/ajax_function/'+id
);
}
controller:
Code:
function ajax_function(){
$this->myselection_model->abba();
}
and model:
Code:
function abba(){
$data = array(
'id' => $this->uri->segment(3),
'userid' => $this->session->userdata('username')
);
$this->db->insert('enroll', $data);
}
and still nothing...
i've also tried passing variable to the model (id) from controller but also nothing
__________________________________
I've used firebug nad I found a problem... it was my bad because I've tried to post varchar(10) and in mysql i had only varchar(5). Thank you all for your help.