How to catch the pressing of the button?

Button I caught a post method type="", but wanted to make a beautiful button, and it can be done via a button, the question is how do I catch and treat depression ?
Before that input was.
Caught clicking here
if (isset($_POST['btsumbut']))
And has now made buttonom
<form style="width: 230px;" method="POST" action>
 <input id="index_rcolumn" class="big_text" type="text" name="login" placeholder="Your username">
br><br>
 <input id="index_rcolumn" class="big_text" type="password" name="password" placeholder="enter password">
br><br>
 <button id="index_login_button" class="flat_button index_login_button button_big_text">Login</button> 
</form>
August 19th 19 at 23:18
3 answers
August 19th 19 at 23:20
Solution
<button type="submit" name="btsumbut">Button</button>
name is useless to set on the button. Serialize it still will not see. - Steve.Hayes commented on August 19th 19 at 23:23
: Where here the author has mentioned about serialization? - eduardo_Crist commented on August 19th 19 at 23:26
: Thank you all done as it should, all good. - Carmela.Ada commented on August 19th 19 at 23:29
August 19th 19 at 23:22
I have this option use.
The function takes 3 arguments (the Object, Event, Action)
<form onsubmit="postQuery($(this), event, 'login'); return false;" action="/auth" method="POST">
 <input type="tel" name="phone" placeholder="password" autocomplete="off" required>
 <button class="btn-primary">Login</button>
</form>

requestSent = false; // flag that would be impossible to send another request to the server.

function postQuery(form, event, action){
 var 
 url = form.attr('action'),
 data = form.serialize();
 if(!requestSent) {
 requestSent = true;
$.ajax({
 type: "POST",
 async: true,
 url: url,
 cache: false,
 data: data+'&action='+action,
 success: function(data){
 // do something 
},
 complete: function() {
 //requestSent = false;
 // do something after AJAX request
}
});
}
}
August 19th 19 at 23:24
if ($_SERVER['REQUEST_METHOD'] === "POST") { 
 // Process the form data
}

Find more questions by tags PHP