我正在尝试为每个选中的复选框将文本值字段传递到下一页,但我只获取最后一个文本字段值,例如:
checkbox textfield
selected ABCD
selected ABCDE
我每次只取回 ABCDE
page1.php
echo "<td width='10px'><input name='question[$rowid][]' type='checkbox' value='1' /></td>";
echo "<td width='230px'><input name='newname' type='text' value='$certn'/></td>";
page2.php
foreach ($_POST['question'] as $key => $ans) {
$nn = $_POST['newname'];
echo $key . $nn;
echo "</br>";
}
帮助将不胜感激