Answer the question
In order to leave comments, you need to log in
How to solve the problem after sending POST?
Everyone knows the message
Чтобы отобразить эту страницу, Firefox Developer Edition
должен отправить информацию, которая повторит любое ранее произведённое действие
(например, запрос на поиск или онлайн-покупка).
header('Location:#');
Answer the question
In order to leave comments, you need to log in
You can direct the user to the same page.
After processing the submitted form in the php script, write the header location of the same page from which the submission took place. After that, the form will not be resubmitted.
When I log into my account, I expect to be on a different page! You do a redirect either to yourself or to the desired one and that's it.
Use ajax to avoid page reload api.jquery.com/jquery.ajax
If you need to stay on the same page
<?php
if (/* login success */) {
header("HTTP/1.1 205 Reset Сontent");
}
<?php
if (/* login success */) {
header( 'Location: /* new location*/', true, 205);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question