大家好 现在是2周,我寻找我的问题的答案,没有运气。希望有人为能帮助我在此1复选框与来自sql的2值通过选择
我有我从数据库
<form style="margin-top:-30px" method="POST" action="extradata.php">
<?php
$sql = "SELECT ext_id,ext_price,ext_name,ext_description FROM tbl_extra ORDER by ext_id ASC";
$result = mysql_query($sql) or trigger_error(mysql_error(),E_USER_ERROR);
$number = mysql_num_rows($result);
$i = 0;
while ($number > $i) {
$NA= mysql_result($result,$i,"ext_name");
$PR= mysql_result($result,$i,"ext_price");
print "<input type='checkbox' name='extra[]' value='$NA'></td>";
$i++;
}
?>
什么,我试图做的是与2值
1. $NA
传递价值extradata.php
调用chackbox选项,
2. $PR
当选择框然后插入到数据库中的$NA
到ex_tra
和$PR
到ex_price
所有
提交您的问题时有什么机会看到预览? – Fosco 2011-05-20 15:13:42