fork download
  1. <?php
  2.  
  3. $_POST = array('id' => 0, 'nome' => 'fulano', 'email' => 'fulano@email.com');
  4.  
  5. if(!empty($_POST['id'] && $_POST['nome'] && $_POST['email'])){
  6. echo 'campos válidos';
  7. }else{
  8. echo 'campos inválidos';
  9. }
  10.  
  11. echo "<pre>";
  12. print_r($_POST);
Success #stdin #stdout 0.02s 23612KB
stdin
Standard input is empty
stdout
campos inválidos<pre>Array
(
    [id] => 0
    [nome] => fulano
    [email] => fulano@email.com
)