php – Form does not send all variables through POST

Question:

I'm a beginner in PHP and I created a form, and when I submit it by POST , only two variables ( DESCRICAO and CODIGO ) are being sent, the others are blank. What is the error in this code?

<form action="../function/func_inserir.php" id="inserir_C" name="inserir_C"
    onsubmit="return validateForm()" method="POST">
<p style="margin-left:200px"><b>Descrição:</b>
<input type="text" name="DESCRICAO" MAXLENGTH="100" size="50" value="" />
<div id="Produto">
<p id="TABELAS"><b>PRODUTO</b></p>
<table id="TABELAS" >
 <tr>
   <th>Código do Produto:</th>
   <td>
      <input type="text" name="CODIGO" MAXLENGTH="13" size="11" value="" onkeypress="return Only_N(event)"/>
  </td>
  <th>Acabamento:</th>
  <td>
   <?php 
       $rs = mysql_query("SELECT ACABPK,DESCRICAO FROM dober.acabamento ORDER BY FAT"); 
       montaCombo('AC_cmb', $rs, 'ACABPK', 'DESCRICAO');
   ?>
   </td>
 </tr>
 <tr>
    <th>Peso Bruto:</th>
    <td>
       <input type="text" name="PBRT" MAXLENGTH="7"  size="11" value="" onkeypress="return validate_P(event)"/>
    </td>
    <th> Tratamento Térmico:</th>
    <td>
    <?php 
        $rs = mysql_query("SELECT TRAT_TERMPK,DESCRICAO FROM dober.tratamento_termico ORDER BY DESCRICAO"); 
        montaCombo('TT_cmb', $rs, 'TRAT_TERMPK', 'DESCRICAO');
    ?>
    </td>
 </tr>
 <tr>
   <th>Peso Liquido:</th>
   <td>
      <input type="text" name="PLIQ" MAXLENGTH="7"  size="11" value="" onkeypress="return validate_P(event)"/>
   </td>
 </tr>
</table>
</div><!-- end of div produto -->

<div>               
<button type="submit" id="cadastra" class="btnCD">CADASTRAR</button>
<input type="hidden" name="OPCAO" value="insert" />
</div>

</form> 

Answer:

I created the following func_inserir.php page and it worked for this variable:

<?php

$a = $_REQUEST['PLIQ'];

print $a;

Attempts to capture values ​​via $_REQUEST .

Scroll to Top