Answer the question
In order to leave comments, you need to log in
How to remove re-sending a POST request?
Good to everyone!
Usually, when submitting a form and then reloading the page, the browser prompts you to submit the form again.
I have a search form on one page. The data is output and processed on another. When you reload or return to the data page, the browser prompts you to resubmit the form. Can this be bypassed somehow?
Answer the question
In order to leave comments, you need to log in
yes, you can, after submitting the form, redirect the user to the page url:
<?php
if (!empty($_POST)) {
// ......
header('location:?');
}
?>
<form method="post">
<input type="submit" name="submit">
</form>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question