I am trying to call php file located in the same directory as HTML using $.post() method of Ajax. however, i am getting a file not found(404) error.
below is the code I am using.
$(document).ready(function(){
$("#formSubmit").on("click",function(){
alert("in iquery");
$.post("./path.php",
function(){
alert("success1");
}
);
});
});
I have tried calling other php file located in the subdirectory with "./PHP/path2.php". Its resulting in the same error.
Please help.