I have a HTML form echoed in PHP, the form action calls a PHP function. I want to disable the submit button after its been clicked without using jQuery if possible.

```
#PHP
echo '
<form method="POST" action="' . phpFunction() . '">
    //form fields
    <button name="submit" type="submit" class="btn btn-primary btn-block">Enviar</button>
</form>';

```

I have tried using `onclick="this.disabled=true"` on the button, but it prevents the PHP function from excecuting.
What should I do to excecute the function and disable the button?