Good morning,
I have to check if all fields of the form, sent as $ _POST, have not been blank, this is until I solved it. But I wanted to see a way to not need to use many if / elif to check every index of $ _POST would:
if(empty($_POST['nome'])){?>
<p>Campo NOME em branco</p>
<?php}
elif(empty($_POST['cpf'])){?>
<p>Campo CPF em branco</p>
<?php}
elif(empty($_POST['endereco'])){?>
<p>Campo ENDERECO em branco</p>
<?php}
...
else{
$nome = $_POST['nome'];
$cpf = $_POST['cpf'];
$endereco = $_POST['endereco'];
?>
I just tried to use if (empty ($ _ POST)) but it did not work, I let it go even with the blank fields.