<?
include "connect.php";
$id_type_select=$_GET[id_type];
?>
<Table cellspacing=0 width=100% border=1 bordercolor=black>
<tr>
<td width="5%"><center><b>ÅӴѺ·Õè</b></center></td>
<td width="10%"><center><b>ÃËÑÊÇÑÊ´Ø</b></center></td>
<td width="20%"><center><b>ÃÒ¡ÒÃ</b></center></td>
<td width="10%"><center><b>¨Ó¹Ç¹¤§àËÅ×Í</b></center></td>
<td width="10%"><center><b>¨Ó¹Ç¹ÇÑÊ´Øà¢éÒ</b></center></td>
<td width="15%"><center><b>ÃÒ¤ÒµèÍ˹èÇÂ</b></center></td>
<td width="20%"><center><b>ÃÒ¤ÒÃÇÁ</b></center></td>
<td width="10%"><center><b>ÃѺà¢éÒ</b></center></td>
<?
$sql="select * from product where ref_id_type='$id_type_select' ";
$result=mysql_db_query($dbname,$sql);
while ($rs=mysql_fetch_array($result)){
$id=$rs[id];
$code=$rs
โค้ด: เลือกทั้งหมด
;
$description=$rs[description];
$unit=$rs[unit];
$qtd=$rs[qtd];
$price=$rs[price];
$total=$rs[total];
$ref_id_type=$rs[ref_id_type];
echo "<tr> <td align=center>$id</td><td align=center>$code</td><td >$description</td><td align=center>$qtd</td><td><center><input type='text' name='num' value='$num' size='4'></center></td> <td align=right>$price</td><td><center>$total</center></td><td align=center><a href='order_add.php?id=$id'>ÃѺà¢éÒ</a> </tr>";
}
?>
</table>
อันนี้ทำแล้วดึงข้อมูลได้แต่ถ้าจะส่งข้อมูลนี้ไปโดยผ่านการส่งแบบ get อะต้องเขียนยังไงค่ะ เขียนเท่าไรก้อไม่ผ่าน
อันนี้อัพค่าที่ละตัวเลยค่ะ คืออยากเอาตัวที่รับไปคำนวณก่อนด้วยค่ะ
คือ ตัว $qtd จะดึงจากฐานมาแล้วบวกกับ num ที่รับเข้ามาใหม่
แล้วเอา ผลจากอันนี้ไป คูณ กับ $price แล้วนำผลที่ได้ไปบวกกับ $total ที่ดึงจากฐานเหมือนกันค่ะ
หรือมีวิธีอื่นแนะนำไม่ค่ะ ขอบคุณล่วงหน้าค่ะ