【发布时间】:2021-03-14 17:10:50
【问题描述】:
我是 PHP 新手,但找不到我需要的东西。所以我的问题是我在 HTML 中有 4 个同名的输入,我想在 PHP 中用它们创建一个数组。有没有办法做到这一点?查看下图:Photo of 4 inputs
所以这 4 个输入具有相同的名称,我想获取用户输入的信息并将其插入 HTML 页面,请回答我的问题或推荐更好的方法!
这是我的代码:
<input class="inputText" type = "text" class="form-control" placeholder="Some text here"/>
<input class="inputText" type = "text" class="form-control" placeholder="Some text here"/>
<input class="inputText" type = "text" class="form-control" placeholder="Some text here"/>
<input class="inputText" type = "text" class="form-control" placeholder="Some text here"/>
【问题讨论】:
-
你的代码在哪里?
-
抱歉,我马上编辑
-
您在此输入中没有
name属性