In modal dialog form submit value are not passed in to the my controller
function save()
{
var url;
url = "<?php echo site_url('index.php/User/book_update')?>";
$.ajax({
url : url,
type: "POST",
data: $('#form').serialize(),
dataType: "JSON",
success: function(data)
{
$('#modal_form').modal('hide');
},
error: function (jqXHR, textStatus, errorThrown)
{
alert('Error adding / update data');
}
});
}
while submitting form button no response only Error adding / update data shows
public function book_update()
{
$markid= $this->input->post('markid');
$subcode=$this->input->post('subcode');
echo $markid;
echo $subcode;
}