if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Something posted if (isset($_POST['btnDelete'])) { // btnDelete } else { // Assume btnSubmit } }