Did this:

There is such code:

$submit1 = $_POST["submit1"]; $submit2 = $_POST["submit2"]; if(isset($submit1)){ echo "111"; }elseif(isset($submit2)){ echo "222"; } 

But nothing good happened, that is. submit does not submit a value by condition, but without a condition. What is the problem?

Closed due to the fact that the essence of the question is incomprehensible by the participants Igor , user194374, Denis , Denis Bubnov , Alex 8 Dec '16 at 10:46 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

     <form method="post"> ... <input type="submit" name="save" value="Сохранить" /> <input type="submit" name="delete" value="Удалить" /> </form> if (isset($_POST['save'])) { ... } else if (isset($_POST['delete'])) { ... }