i am making a database and i want to store data from dynamic fields. below i m submittig my form data to datapost.php page to proceed inserting there values but i have no any clear idea how it will success.
i want to save this form in my database so how it is posible?

<form method="POST" action="datapost.php">

        <!--Static Fields-->

        <input type="text" name="code"/>
        <input type="text" name="company"/>
        <input type="checkbox" name="A type" value="A Calss"/>
        <input type="checkbox" name="B type" value="B Calss"/>
        <input type="checkbox" name="C type" value="C Calss"/>

        <br><br>

        <!--Dynamic Fields-->

        <input type="text" name="product[]"/>
        <input type="text" name="description[]"/>
        <input type="checkbox" name="A[]" value="A"/>
        <input type="checkbox" name="B[]" value="B"/>
        <input type="checkbox" name="C[]" value="C"/>
        <br><br>
        <input type="text" name="product[]"/>
        <input type="text" name="description[]"/>
        <input type="checkbox" name="A[]" value="A"/>
        <input type="checkbox" name="B[]" value="B"/>
        <input type="checkbox" name="C[]" value="C"/>
        <br><br>
        <input type="text" name="product[]"/>
        <input type="text" name="description[]"/>
        <input type="checkbox" name="A[]" value="A"/>
        <input type="checkbox" name="B[]" value="B"/>
        <input type="checkbox" name="C[]" value="C"/>
        <br><br>
        <input type="text" name="product[]"/>
        <input type="text" name="description[]"/>
        <input type="checkbox" name="A[]" value="A"/>
        <input type="checkbox" name="B[]" value="B"/>
        <input type="checkbox" name="C[]" value="C"/>

        <input type="submit" name="submit"/>

</form>

Have a look with

print_r($_POST);

You'll see that some fields are arrays. You can loop through them with foreach.

i have no so much skill so
please make datapost.php
that way i could understand clearly

Thanks guys Its solved via
print_r($_POST);
and arrange array method

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.