-1
我有以下代碼:在提交呼應TD下拉菜單和廣告新的TD
<form action="" method="POST">
<?php
$count = isset($_POST['count']) ? $_POST['count'] : 1;
if($count > 11) $count = 11;
?>
<table>
<!-- Keeps track of the current number of rows -->
<input type="hidden" name="count" value="<?php echo $count+1; ?>"/>
<?php for($i = 0; $i < $count; $i++):
// Loop through all rows gathering the data here, and then creating the fields below
$val0 = isset($_POST['field'][$i]['0']) ? $_POST['field'][$i]['0'] : '';
$val1 = isset($_POST['field'][$i]['1']) ? $_POST['field'][$i]['1'] : '';
$val2 = isset($_POST['field'][$i]['2']) ? $_POST['field'][$i]['2'] : '';
?>
<tr>
<td><input name="field[<?php echo $i; ?>][0]" value="<?php echo $val0; ?>"/></td>
<td><input name="field[<?php echo $i; ?>][1]" value="<?php echo $val1; ?>"/></td>
<td><input name="field[<?php echo $i; ?>][2]" value="<?php echo $val2; ?>"/></td>
</tr>
<?php endfor; ?>
</table>
<input type="submit" value="click me" />
我怎樣才能使字段爲下拉列表,當你按下提交回聲出下拉的文本,而不是作爲一個下拉列表?
用戶的其他問題的精確欺騙:http://stackoverflow.com/questions/5702863/php-on-submit-echo-td-fields-and-ad-new-td – 2011-04-18 18:59:54
可能重複[Php:on submit回聲td字段和廣告新td](https://stackoverflow.com/questions/5702863/php-on-submit-echo-td-fields-and-ad-new-td) – 2017-07-16 08:36:37