How to re-submit the form after some time?

How to make after the form has been submitted, to restrict the next attempt, for example, in 10 minutes?
March 19th 20 at 10:23
2 answers
March 19th 20 at 10:25
Solution
alternatively, use a php form handler something like this after the first successful send
$_SESSION['last_submit'] = time();

and just before sending to check the element and compare the listed time with the current, if necessary, issue an error to the visitor
if (isset($_SESSION['last_submit']) && time() - $_SESSION['last_submit'] <= 60 * 1000 * 10) {
 return false;
}
Thank you very much, it will go) - Alberto37 commented on March 19th 20 at 10:28
March 19th 20 at 10:27
On the contrary, in the session to put time of last sent and if the time runs out to write the form data attribute. And check its js that will resolve to submit the form or not

Find more questions by tags JavaScriptPHP