I'm putting some instructions inside a same PHP file that are executed according to the value of the send
variable received, at least that's what I thought. In this code you have two of these instructions, one that receives send == 'buUserBloqueia'
and another that receives send == 'cCadSend'
but once the first one receives the command, executes the statement and does not end up executing the next ones that has another value of send
.
Code
// Função serve para bloquear o usuário do sistema
if((isset($_POST['send']) == "buUserBloqueia") && (isset($_POST['id']) != "")){
// Esta função bloqueia um usuário
exit();
}
// Função serve para cadastrar o usuário no sistema
if ((isset($_POST['send']) == "cCadSend")){
// Esta função cria um usuário
exit();
}
Why does submitting Ajax with a specified value of send
and after checking the value of send
in PHP, does the script continue to execute all instructions below it?