FORM It does not send by POST some fields that come from MYSQL

0

I am making a form as follows:

    <form id="datosventa" name="datosventa" method="POST" action="nventalentes2.php">
        <?php
        $montura = $_POST['categoryName'];
        $paciente = $_POST['paciente'];

          $query2 = $con -> query ("SELECT * FROM monturas WHERE id = $montura");

          while ($valores2 = mysqli_fetch_array($query2)) {
            ?>
                <input disabled type="text" name="id_montura" id="id_montura" value="<?php echo $valores2['id'] ?>" style="width: 50px;">
                <input disabled type="text" name="nombre_montura" id="nombre_montura" value="<?php echo $valores2['nombre'] ?>" style="width: 250px;">
                <input disabled type="text" name="precio_montura" id="precio_montura" value="<?php echo $valores2['precio'] ?>" style="width: 80px;"><br>
            <?php
          }

          $query3 = $con -> query ("SELECT * FROM clientes WHERE id_cliente = $paciente");

          while ($valores3 = mysqli_fetch_array($query3)) {
            ?>
                <input disabled type="text" name="id_cliente" id="id_cliente" value="<?php echo $valores3['id_cliente'] ?>" style="width: 50px;">
                <input disabled type="text" name="nombre_cliente" id="nombre_cliente" value="<?php echo $valores3['nombre'],$valores3['apellidos'] ?>" style="width: 250px;">
            <?php
          }
         ?>

The case is that the rest of the fields below are inputs or normal selects ...

These fields

When submitting, it does not send them, as if they do not belong to the FORM, the case that when submitting, it shows a preview of everything previously filled in.

I think I've explained myself well, if someone could help me or still have some doubts, you can ask me.

Thank you very much in advance to the community.

Greetings.

    
asked by Javier Avila Fernandez 24.04.2018 в 22:05
source

1 answer

1

You must remove the "disabled" attribute from the input elements so they can be sent.

I hope it's useful.

I add a link where it explains the operation of the "disabled" attribute.

link

    
answered by 24.04.2018 / 22:08
source