Skip to main content
1 de 3
Fabiano Monteiro
  • 1,2mil
  • 3
  • 13
  • 30

<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post"> 
<label for="higiene">Higiene</label>
<select name="higiene" id="higiene" class="form-control" required >
   <option value=""></option>
   <option value="1">1</option>
   <option value="2">2</option>
</select>
<input type="submit">
</form>

Use a sintaxe foreach:

<?php

  if (!empty($_POST['higiene'])) {

    foreach ($_POST as $key => $value)
        {
            echo $key . ": ". $value . "\n"; 
        }
  }

?>
Fabiano Monteiro
  • 1,2mil
  • 3
  • 13
  • 30