Answer the question
In order to leave comments, you need to log in
Why is there a redirect to the main page after submitting the form with ajax?
I have a form,
send it like this:
$('#build-calc-steps-form').on('submit', function () {
var fdata = $(this).serialize();
$.ajax({
method: "POST",
url: "wp-content/plugins/build-calc/build-calc-result.php",
data: fdata,
success: function(data) {
console.log(data);
}
});
});
echo '<pre>';
print_r($_POST);
echo '</pre>';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question