有人可以解决我的问题吗?我收到了这个错误:
注意:使用未定义的常量 qty - 在第 65 行的 C:\Program Files (x86)\xampp\htdocs\dede\transaksi.php 中假定为“数量”
注意:未定义的偏移量:C:\Program Files (x86)\ 中的 3第 65 行的 xampp\htdocs\dede\transaksi.php
在这个脚本上,我想在成本和数量之间相乘,有人知道吗?
$select=mysql_query("Select nota.id_item,nota.qty,item.nama_item,item.cost_item FROM nota,item WHERE nota.id_item = item.id_item");
while($data=mysql_fetch_array($select)){
$sub=$_POST[$data[qty]] * $_POST[$data[cost_item]];
echo"<tr>";
echo"<td height=20 >$data[id_item]</td>";
echo"<td height=20 >$data[nama_item]</td>";
echo"<td height=20 >$data[cost_item]</td>";
echo"<td height=20 >$data[qty]</td>";
echo"<td height=20 >$data[qty]*$data[cost_item]</td>";
echo"<td><a href=deleten.php?id=$data[id_item]>X</a></td>";
echo"</tr>";}