我有一个需要10个相似行数据的表单。该表格收集产品代码,说明和数量。我遍历10行并使用数组收集信息。阵列不携带数据转发
$code = array();
$description = array();
$quantity = array();
<?php
for($i=0; $i<10; $i++){
?>
<div class="quote-row">
<div class="quote-id">
<?php echo $i+1; ?>
</div>
<div class="quote-code">
<input type="text" class="quotecode" name="<?php echo $code[$i]; ?>" />
</div>
<div class="quote-description">
<input type="text" class="quotedescription" name="<?php echo $description[$i]; ?>" />
</div>
<div class="quote-quantity">
<input type="text" class="quotequantity" name="<?php echo $quantity[$i]; ?>" />
</div>
</div>
<?php
}
?>
在接下来的页面,然后我用$_POST['code'], $_POST['description'], $_POST['quantity']
发扬的数据,并尝试使用它。
我的问题是数据似乎没有到达?
使用for循环,我仍然可以提交表单并将所有数据转发吗?
希望这是尽可能丰富,谢谢!
'var_dump'你的$ _POST数组,看看有什么要发送 – 2012-03-20 13:00:24