I want to post this html table on submit button click.
01 - I want to retrieve the data of this table in php code (server side) 02 - I also want to display this tabl
Since you are trying to submit multiple rows of inputs/selects with the same 'name' attribute to a backend, you would need to add square brackets [] to the end of the name value in those inputs (in the table rows).
This tells your browser to create an array for that name property. In php, read it as $_POST['color_1'][0] and $_POST['color_2'][0], and loop as you'd like. The brackets are in Phil Bailey's answer, but they are not pointed out. (Added because a recent search led me to this) 0 讨论(0) 查看其它4个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
This tells your browser to create an array for that name property.
In php, read it as $_POST['color_1'][0] and $_POST['color_2'][0], and loop as you'd like.
$_POST['color_1'][0]
$_POST['color_2'][0]
The brackets are in Phil Bailey's answer, but they are not pointed out. (Added because a recent search led me to this)