I would like to know how I can capture the data of an input type text inserted in the MySQL DB and display them in a table with PHP using an array, since with the other inputs it works correctly for me but it does not work with the input type text, I leave the code:
HTML:
<input type="text" class="form-control" id="Desc" placeholder="Ingresar texto" name="Desc" autofocus required>
PHP:
<?php while ($producto = $result->fetch_assoc()){ ?>
<tr>
<td><?php echo $producto['Descripción']; ?></td>
</tr>
<?php } ?>
Insert in the BD:
$Descripción = $_POST['Desc'];
$stmt = $bd->prepare("
INSERT INTO producto (Id, Stock, Tipo, Disponible, Valor, Descripción)
VALUES (?, ?, ?, ?, ?, ?)
");
//Asigna las variables a la query
$stmt->bind_param('isssis', $Id, $Stock, $Tipo, $Disponible, $Valor, $Descripción);
//Ejecuta la query
$stmt->execute();