Your problem here is that you are running into a race condition, and I'll explain:
You wish to disable the button, but in doing so you are also disabling the option for submitting the form (using that button), so your solution is to handle the submittio yourself (by calling the submit() function from the JS code).
The problem you got here is that when you call the submit() function (from js) you are not getting the value of the button that was clicked.
Another problem that you got here is the fact that your buttons doesn't have names, so no matter what - you will not get their values on your server.
Anyway - you got 2 options here.
The first one - have a hidden field, and when the user clicks the button - set the value of that field to the value of the button that was clicked, and submit the form. You will receive the data on the server.
The second option is to set the button as disabled right after you make sure the form is submitted.
Here is an example:
<form method="post">
<!-- other form elements here -->
<input type="submit" name="a" value="button1">
<input type="submit" name="a" value="button2">
</form>
<script>
$('input[type=submit]').click(function() {
var clickedBtn = $(this)
setTimeout(function() {
clickedBtn.attr('disabled', 'disabled');
}, 1);
});
</script>
(Also notice I moved your js code right after your html, otherwise your jquery selector will find nothing)