<form action="test.php" method="POST">
HTML CODE
</form>
<button type="submit" name="test" value="1">Buy</button>
---> test.php
if(isset($_POST['test'])) {
PHP CODE
}
I've included test.php above that html form, but when I click on submit over and over again before the page runs the php code and loads the whole page again, it runs the php code as many times as I clicked
How do I make sure that one cannot abuse 'submit' button over and over to run the php code again and again? I only want the first click to be considered.
Can someone help please.