I want to run PHP code with the submit button. The problem is that every time I refresh the page, the code is executed again. I used this:
if (isset($_POST['carregar'])) {
// pedaço de código...
}
And the button:
echo "<form method=POST action=#>";
echo "<input type=submit name=carregar value=Carregar>";
echo "</form>";