0

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>

3
Contributors
4
Replies
19
Views
2 Years
Discussion Span
Last Post by zaheerprince
0

Have a look with

print_r($_POST);

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

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.