My intention is to create a form in HTML where the user could register some quality features of a product. The number of features to be registered varies according to the model, this info is registered on a table in SQL.
So far I manage to generate the inputs, but it is very fast, the user cannot fill all the inputs.
## query to get the product information from database ## 
$query_list = "SELECT * FROM data_products";
$result_list = mysqli_query($conn, $query_list);
## get the number of rows
$query_data_rows = mysqli_query($conn, $query_list);
$data_rows = mysqli_fetch_array($query_data_rows);
?>
## here is the first form, where the user selects the product model, 
## therefore it should query the number of raws (n) registered on the table
<div class="container">
    <form action="" method="post" onsubmit="getdata()">
        <select name="select1">
            <option value=" "> </option>
            <?php
                while ($row = mysqli_fetch_array($result_list)) {
                echo "<option value='" . $row['customer_Id'] . "'>" . $row['customer_Id'] . "</option>";
                }
            ?>
        </select>
        <input type="submit" name="submit" value="Go"/>
    </form>
</div>
## here my intention is to return the (n) number of input fields
## it correctly displays the number of input fields, but it is very fast
## I am missing something here
<?php 
if(isset($_POST['select1'])){ ?>
<form id="form" action="" method="post">
    <input type="submit">
</form>
<?php       
}
?>
## I am almost zero skilled on Javascript, 
## but browsing on the world web wide and reading the documentation of the language 
## I got the code below.  
<script>    
    function getdata() {
        var no = <?php echo $data_rows['number'] ;?>;
        for(var i=0;i<no;i++) {
            var textfield = document.createElement("input");
            textfield.type = "text";
            textfield.value = "";
            textfield.name = i+1 + "a"
            textfield.placeholder = i+1
            document.getElementById('form').appendChild(textfield);
        }
    }
</script> ```
 
    