<? session_start(); include("connect.php"); ?> <html> <head> <title>ThaiCreate.Com</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <? mysql_connect("localhost","root","12345678"); mysql_select_db("data"); ?> <table width="400" border="1"> <tr> <td width="101">ProductID</td> <td width="82">ProductName</td> <td width="82">Price</td> <td width="79">Qty</td> <td width="79">Total</td> </tr> <? $Total = 0; $SumTotal = 0; for($i=0;$i<=(int)$_SESSION["intLine"];$i++) { if($_SESSION["strProductID"][$i] != "") { $sql = "SELECT * FROM product WHERE product_num = '".$_SESSION["strProductID"][$i]."' "; $ans = mysql_query($sql) or die(mysql_error()); $result = mysql_fetch_array($ans); $Total = $_SESSION["strQty"][$i] * $result["price"]; $SumTotal = $SumTotal + $Total; ?> <tr> <td><?=$_SESSION["strProductID"][$i];?></td> <td><?=$result["product_detail"];?></td> <td><?=$result["price"];?></td> <td><?=$_SESSION["strQty"][$i];?></td> <td><?=number_format($Total,2);?></td> </tr> <? } } ?> </table> Sum Total <?=number_format($SumTotal,2);?> <br><br> <form name="form1" method="post" action="save_checkout.php"> <table width="304" border="1"> <tr> <td width="71">Name</td> <td width="217"><input type="text" name="txtName"></td> </tr> <tr> <td>Address</td> <td><textarea name="txtAddress"></textarea></td> </tr> <tr> <td>Tel</td> <td><input type="text" name="txtTel"></td> </tr> <tr> <td>Email</td> <td><input type="text" name="txtEmail"></td> </tr> </table> <input type="submit" name="Submit" value="Submit"> </form> <? mysql_close(); ?> </body> </html> <?/* This code download from www.ThaiCreate.Com */ ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง