I am using ajax page calling after success call a php function but issue is that function is not defined error show in console panel.
here is the ajax code
$("#submit_btn").on('click',function() {
var batchid = $('#batchid').val();
var sessionid = $('#sessionid').val();
var moduleid = $('#moduleid').val();
var instructorid = $('#instructorid').val();
$.ajax({
type: "POST",
url: "check_lp.php",
data: {batch: batchid, session: sessionid, module: moduleid, instructor: instructorid},
success: function(result) {
var value = $.trim(result);
if (value == "1"){
alert('Lesson Plan Found');
} else{
submitForm();
}
},
});
});
php function code is
function submitForm()
{
}
is there right way to call a php function?