Hello. I'm having trouble submitting my data to a form. My problem is this:
My client has created a series of products in the database. And now he needs a form in which will appear all the quantities of the products created. In this form it will update the quantity of available products.
There is no limit to the creation of products. Then the form may have more or less fields to fill in tomorrow.
I was able to generate the form as follows:
<?php
$produtos = array();
$sql = "select * from tb_produto";
$search_query = mysql_query($sql);
while($select = mysql_fetch_array($search_query)){
$id_produto = $select["id_produto"];
$titulo = $select["titulo"];
$quantidade = $select["quantidade"];
array_push($produtos, $titulo);
?>
<div>
<label><?php echo $titulo; ?></label>
<input type="text" name="txtQuantidade" value="<?php echo $quantidade; ?>">
</div>
<?php
}
?>
Now I need to submit this data. My question is: how is it possible to submit a form consisting of an unknown number of fields at once?