【发布时间】:2017-01-05 05:08:28
【问题描述】:
需要将 html 元素数组发送到数据库中的不同行中 下面给出的是html代码。
<form action="#" method="post">
<input type="text" name="user[]" />
<input type="text" name="user[]" />
<input type="text" name="user[]" />
<input type="submit" value="submit" >
</form>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
foreach($_POST['user'] as $key => $value)
{
echo $key." has the value = ". $value."<br>";
}
}
?>
【问题讨论】:
-
从操作中移除井号。
标签: codeigniter mysqli