Inserting multiple rows from a php form into the database

后端 未结 3 1603
[愿得一人]
[愿得一人] 2021-01-16 19:43

my form as the following table (of textfeild). I am feeding the values into these textfeild. How can i enter these values into my database? plz help.

3条回答
  •  粉色の甜心
    2021-01-16 20:48

    The simplest way is probably to make the $_POST values for roll etc. an array (so $_POST becomes a multidimensional array).

    See this previous question for an example of how it can be done:

    Submitting a multidimensional array via POST with php

    You can then loop through the array values in your database insert code.

提交回复
热议问题