<?php include('phpMySQLConnect.php'); $strSQL = "SELECT * FROM ch_italia_design where DsgnID='$id'"; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); while ($objResult = mysql_fetch_array($objQuery)) { ?> <td align="center" valign="top"><img src="<?php echo $objResult ['DetailDsgnImgPath'];?>" width="450" height="410" align="top"></td> <td valign="top" width="43%" height="233"> <form action="basket.php?id=<?=$id?>" method="post"> <table width="299" height="155" border="0"> <tr> <td colspan="2"><font size="+1.5" color="#333333"><b>• Design Name :</b></font><b> <font color="#000066"> <?=$objResult['DsgnName'];?> </font> </b></td> </tr> <?php $strSQL2 = "SELECT * FROM size where DsgnID='$id'"; $objQuery2 = mysql_query($strSQL2) or die ("Error Query [".$strSQL2."]"); while ($objResult2 = mysql_fetch_array($objQuery2)) { ?> <tr> <td width="33"><input type="checkbox" name="check_design[]" id="check_design" value="<?=$objResult2['SizeDesc']; ?>"> <label for="check_design"></label></td> <td width="256">Size <?php echo $objResult2['SizeDesc']; } ?>
<? include('phpMySQLConnect.php'); for($i=0;$i<count($_POST["check_design"]);$i++) { if(trim($_POST["check_design"][$i]) != "") { if(!isset($_SESSION["intLine"])) { $_SESSION["intLine"] = 0; $_SESSION["strSize"][0] = $_POST["check_design"][$i]; $_SESSION["strQty"][0] = 1; $_SESSION["strID"][0] = $_GET['id']; } else { $key = array_search($_POST["check_design"][$i], $_SESSION["strSize"]); $key2 = array_search($_GET["id"], $_SESSION["strID"]); if((string)$key != "" && (string)$key2 != "" ) { $_SESSION["strQty"][$key] = $_SESSION["strQty"][$key] + 1; } else { $_SESSION["intLine"] = $_SESSION["intLine"] + 1; $intNewLine = $_SESSION["intLine"]; $_SESSION["strSize"][$intNewLine] = $_POST["check_design"][$i]; $_SESSION["strQty"][$intNewLine] = 1; $_SESSION["strID"][$intNewLine] = $_GET['id']; } } } } ?> <table bordercolordark="#272727" align="center" width="949" bgcolor="#D7D7D7"= "0"> <tr> <td bgcolor="#F7F7F7"align="center" width="226" ><font color="#333333" size="+1"><b>Picture</b></font></td> <td bgcolor="#F7F7F7"align="center" width="134" ><font color="#333333" size="+1"><b>DesignID</b></font></td> <td bgcolor="#F7F7F7"align="center" width="118" ><font color="#333333" size="+1"><b>DesignName</b></font></td> <td bgcolor="#F7F7F7"align="center" width="106" ><font color="#333333" size="+1"><b>CollectionID</b></font></td> <td bgcolor="#F7F7F7" align="center" width="157" ><font color="#333333" size="+1"><b>Size</b></font></td> <td bgcolor="#F7F7F7"align="center" width="117" ><font color="#333333" size="+1"><b>Quantity</b></font></td> <td bgcolor="#F7F7F7" align="center" width="45" ><font color="#333333" size="+1"><b>Delete</b></font></td> </tr> <? for($i=0;$i<=(int)$_SESSION["intLine"];$i++) { if($_SESSION["strSize"][$i] != "") { $strSQL = "SELECT * FROM ch_italia_design WHERE DsgnID = '".$_SESSION["strID"][$i]."' "; $objQuery = mysql_query($strSQL) or die(mysql_error()); $objResult = mysql_fetch_array($objQuery); ?> <tr> <td><img align="middle"src="<?=$objResult['DsgnImgPath'];?>"/></td> <td align="center"><?=$_SESSION["strID"][$i];?></td> <td align="center"><?=$objResult['DsgnName'];?></td> <td align="center"><?=$objResult['ColcID'];?></td> <td align="center"><?=$_SESSION["strSize"][$i];?></td> <td align="center"><?=$_SESSION["strQty"][$i];?></td> <td ><a href="delete.php?Line=<?=$i;?>"><img align="absbottom"src="imgs/1370804803_Remove.png" width="35" height="35"></a></td> </tr> <? } } ?>
Code (PHP) [php] <?php include('phpMySQLConnect.php'); $strSQL = "SELECT * FROM ch_italia_design where DsgnID='$id'"; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); while ($objResult = mysql_fetch_array($objQuery)) { ?> <td align="center" valign="top"><img src="<?php echo $objResult ['DetailDsgnImgPath'];?>" width="450" height="410" align="top"></td> <td valign="top" width="43%" height="233"> <form action="basket.php?id=<?=$id?>" method="post"> <table width="299" height="155" border="0"> <tr> <td colspan="2"><font size="+1.5" color="#333333"><b>• Design Name :</b></font><b> <font color="#000066"> <?=$objResult['DsgnName'];?> </font> </b></td> </tr> <?php $strSQL2 = "SELECT * FROM size where DsgnID='$id'"; $objQuery2 = mysql_query($strSQL2) or die ("Error Query [".$strSQL2."]"); while ($objResult2 = mysql_fetch_array($objQuery2)) { ?> <tr> <td width="33"><input type="radio" name="check_design[]" id="check_design" value="<?=$objResult2['SizeDesc']; ?>"> // ส่วนนี้ครับ <label for="check_design"></label></td> <td width="256">Size <?php echo $objResult2['SizeDesc']; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง