1
Dear, I have a form that sends data through the method $_POST, check if the data are set $_POST['nome_campo']; and through the foreach(), load the array $_POST inside of a variable!
After performing the foreach() I would like to know how to print each array value in another form!?
<?php       
   if( isset($_POST)){         
        $txtQtdFunc = $_POST['txtQtdFunc'];
        //print_r($_POST);
        for ($i = 0; $i < $txtQtdFunc; $i++) {
            //Recebe todos os campos e registros do form
            foreach($_POST as $nome_campo => $valor){
               echo $strMsg = $valor ."<br>";     
           }//fim foreach    
  }//fim isset            
?> 
						
I believe "$_POST" is missing the variable, there at foreach time.
– Ricardo Lucas
It would be important to also post your form
HTMLso that we can verify how the information is being sent, becausename = "txtQtdFunc", is not a good choice. It is not possible to know if it is a text, a number or some data of the Employee. Writing simple and objective names within your application makes it easier to understand and behave your application.– Marcus Italo