Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,028

HOME > PHP > PHP Forum > ช่วยด้วยนะคะคือ ระบบตะกร้าสินค้า เรามีปัญหาค่ะรูปไม่ขึ้นค่ะ



 

ช่วยด้วยนะคะคือ ระบบตะกร้าสินค้า เรามีปัญหาค่ะรูปไม่ขึ้นค่ะ

 



Topic : 073583

Guest




รุปไม่ยอมแสดงบนหน้าที่รันค่ะ แอดรุปลงฐานข้อมูลโดยการเพิ่มสินค้าจากหน้าแอดมินค่ะ


หน้าเพิ่มสินค้า

Code (PHP)
<? include "chksession.php";?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ผู้ดูแลระบบร้านจำหน่ายและซ่อม อุปรณ์คอมพิวเตอร์</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="FCKeditor/fckeditor.js"></script>
</head>
<script>
	function check_number() {
	e_k=event.keyCode
	//if (((e_k < 48) || (e_k > 57)) && e_k != 46 ) {
	if (e_k != 13 && (e_k < 48) || (e_k > 57)) {
	event.returnValue = false;
	alert("กรอกเป็นตัวเลขเท่านั้น!");
	}
	} 
	
	function check(){
		if(f1.product_name.value == ""){
			alert("โปรดกรอกชื่อสินค้าครับ");
			stop();
		}
		if(f1.ref_type_id.value == "0"){
			alert("โปรดกรอกประเภทสินค้าครับ");
			stop();
		}
		if(f1.product_detail.value == ""){
			alert("โปรดกรอกรายละเอียดสินค้าครับ");
			stop();
		}
		if(f1.  product_price .value == ""){
			alert("โปรดกรอกราคาสินค้าครับ");
			stop();
		}
		if(f1.stock.value == ""){
			alert("โปรดระบุจำนวนสินค้าครับ");
			stop();
		}
{
			f1.submit();
		}
	}
</script>
<body leftmargin=0 topmargin=0>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="17" background="images/bg_left.gif"><img src="images/bg_left.gif" width="17" height="16"></td>
    <td width="780" align=lift valign=top><table width="780" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td align=lift valign=top> 
            <? include "menu.php"; ?>
          </td>
        </tr>
        <tr> 
          <td height="20" align=lift valign=top><table width="780" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="200" height="20" align=lift valign=top> 
                  <? include "menu_left.php"; ?>
                </td>
                <td width="580" align=lift valign=top><table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td><div align="center">
                          <table width="550" border="0" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td><p align="left" class="p"><strong>เพิ่มสินค้าใหม่</strong></p></td>
                            </tr>
                            <tr>
                              <td><form name="form1" method="post" action="prd_add2.php" enctype="multipart/form-data" id="f1">
                                  <table width="550" border="0" cellpadding="1" cellspacing="0" bordercolor="#eff2f3">
                                    <tr> 
                                      <td width="115"><p align="right" class="p">ชื่อสินค้า 
                                      :</p></td>
                                      <td width="431"> <input name="product_name"  type="text" id="product_name" size="50" maxlength="150" >
                                      <font color="#FF0000">*</font> </td>
                                    </tr>
                                    <tr> 
                                      <td ><p align="right" class="p">ประเภทสินค้า 
                                          :</p></td>
                                      <td > <select name ="ref_type_id" id"ref_type_id">
                                          <option value = "0" > เลือกประเภทสินค้า</option>
       <?
	   $price=$_POST[price];
	   $t="สนใจติดต่อ";
		include("../connect.php");
		$sql2 = "select  *  from type order by type_id asc" ;
		$result2 = mysql_db_query ($db,$sql2) ;
		while ($rs2 = mysql_fetch_array ($result2)) {
				$type_id = $rs2[type_id] ;
				$type_name = $rs2[type_name];
				echo "<option value = '$type_id'> $type_name </option>" ;
		} 
		?>
                                        </select>
                                        <font color="#FF0000">*</font></td>
                                    </tr>
                                    <tr> 
                                      <td align=lift valign=top><p align="right" class="p">รายละเอียดสินค้า 
                                          :</p></td>
                                      <td > <textarea name="product_detail" rows="4" cols="40"  id="product_detail"></textarea>
                                        <font color="#FF0000">*</font></td>
                                    </tr>
                                    <tr> 
                                      <td ><p align="right" class="p">ราคาสินค้า 
                                          :</p></td>
                                      <td ><p align="left" class="p"> 
                                       
                                          <input  type = "text" name="product_price" id="product_price" onkeypress= "check_number();" size = "20" maxlength="7"> 
                                       <font color="#FF0000">* ไม่มี ให้ใส่ 0</font></p>                                       </td>
                                    </tr>
									
                                    <tr> 
                                      <td ><p align="right" class="p">จำนวนสินค้า 
                                          :</p></td>
                                      <td > <input name = "stock" type = "text" id="stock" onkeypress= "check_number();" size = "20" maxlength="2">
                                        <font color="#FF0000">*</font></td>
                                    </tr>
                                    <tr> 
                                      <td width="115"><p align="right" class="p">รูปภาพสินค้า 
                                      :</p></td>
										<td align="left" valign="top"><?
										 
		  $TextContent = $row["picture"];
include("FCKeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('picture') ;
$oFCKeditor->BasePath	= 'FCKeditor/' ;
$oFCKeditor->Width	= '95%' ;
$oFCKeditor->Height	= '300' ;
$oFCKeditor->Value		= $TextContent ;
$oFCKeditor->Create() ;
?>
										  <input type="hidden" name="MAX_FILE_SIZE" value="100000">
                                        <font color="#FF0000">* </font></td>  
                                </tr>
                                    <tr> 
                                      <td ><p align="right" class="p">สถานะ :</p></td>
                                      <td ><p align="left" class="p"> 
                                          <input type="radio" name="status" value="y">
                                          แสดงหน้าแรก 
                                          <input type="radio" name="status" value="n" checked>
                                          ไม่แสดงหน้าแรก </p></td>
                                    </tr>
                                    <tr> 
                                      <td><div align="center"> 
                                        </div></td>
                                      <td> <input type="button" name="Button" value=" ตกลง " onClick="check()"> 
                                        <input type="reset" name="Reset" value="ยกเลิก">                                      </td>
                                    </tr>
                                  </table>
                                  </form></td>
                            </tr>
                          </table>
                        </div></td>
                    </tr>
                    <tr> 
                      <td><p align="right" class="p"> <font color="#FF0000"> 
                          * โปรดกรอกข้อมูลที่มีเครื่องหมายให้ครบ</font></p></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td align=lift valign=top> 
            <? include "button.php"; ?>
          </td>
        </tr>
      </table></td>
    <td width="17" background="images/bg_right.gif"><img src="images/bg_right.gif" width="17" height="16"></td>
  </tr>
</table>
</body>
</html>





หน้าแสดงสินค้า




Code (PHP)
<?
	@session_start();
	session_register('s_login');
?>
<?
ob_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ร้านจำหน่ายปลาสวยงามและอุปกรณ์ทุกชนิด</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin=0 topmargin=0>
	<? 
	$show_id=$_GET[show_id];
	include "connect.php";
	$sql3  ="select  *  from product where product_id='$show_id' " ;
	$result3=mysql_db_query($db,$sql3);
	$rs3=mysql_fetch_array($result3);
	$product_id=$rs3[product_id];
	$product_id_code=sprintf ("%05d" ,$product_id);
	$product_name=$rs3[product_name];
	$product_detail=$rs3[product_detail];
	$product_price=$rs3[product_price];
	$picture=$rs3[picture];
	?>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="17" background="images/bg_left.gif"><img src="images/bg_left.gif" width="17" height="16"></td>
    <td width="950" align=lift valign=top><table width="950" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td align=lift valign=top> 
            <? include "menu.php"; ?>
          </td>
        </tr>
        <tr> 
          <td height="20" align=lift valign=top><table width="950" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="200" height="20" align=lift valign=top background="images/B_menu.jpg"> 
                  <? include "menu_left.php"; ?>
                </td>
                <td align=lift valign=top><table width="750" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td height="30" background="images/bg_title2.jpg"><p align="left" class="menu2">&nbsp;&nbsp;สินค้า</p></td>
                    </tr>
                    <tr> 
                      <td lign=left valign=top><table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td>&nbsp;</td>
                          </tr>
                          <tr>
                            <td> <div align="center"><? echo "$picture";?></div></td>
                          </tr>
                          <tr> 
                            <td>&nbsp;</td>
                          </tr>
                          <tr> 
                            <td background="images/icon_02.gif"><img src="images/icon_02.gif" width="5" height="5"></td>
                          </tr>
                          <tr> 
                            <td valign=top lign=left><p align="left" class="p"><strong>รหัสสินค้า 
                                :</strong> <? echo $product_id_code?></p></td>
                          </tr>
                          <tr> 
                            <td valign=top lign=left><p align="left" class="p"><strong>ชื่อสินค้า 
                                :</strong> <? echo $product_name?></p></td>
                          </tr>
                          <tr> 
                            <td valign=top lign=left><p align="left" class="p"><strong>ราคา 
                                :</strong> 
							
							<?
							  							
						$number =$product_price;
						$number2=number_format($number,2,'.',','); 
			
							if ($number2 <> 0){
							$x=$number2 ."&nbsp;บาท";
							}else{
							$x="สนใจติดต่อ";
							}
							 echo " $x ";
						 ?>
							 <br>
                              </p></td>
                          </tr>
                          <tr> 
                            <td valign=top lign=left><p align="left" class="p"><strong>รายละเอียดสินค้า 
                                :</strong><? echo $product_detail?> <br>
                              </p></td>
                          </tr>
                          <tr> 
                            <td valign=top lign=left>&nbsp;</td>
                          </tr>
                          <tr> 
                            <td valign=top lign=left><p align="left" class="p"><img src="images/icon_01.gif" width="9" height="9"> 
                                <a href="basket_add.php?product_id=<? echo $product_id ; ?>">หยิบใส่ตะกร้า</a></p></td>
                          </tr>
                          <tr> 
                            <td background="images/icon_02.gif"><img src="images/icon_02.gif" width="5" height="5"></td>
                          </tr>
                          <tr> 
                            <td>&nbsp;</td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td align=lift valign=top> 
            <? include "footer.php"; ?>
          </td>
        </tr>
      </table></td>
    <td width="17" background="images/bg_right.gif"><img src="images/bg_right.gif" width="17" height="16"></td>
  </tr>
</table>
</body>
</html>




Tag : PHP







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2012-02-10 11:36:17 By : ข้าวหอมมะลิ View : 1270 Reply : 10
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

รูปภาพมีอยู่จริง หรือเปล่าครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-02-10 11:46:46 By : webmaster
 


 

No. 2

Guest


มีค่ะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-02-10 12:43:34 By : ข้าวหอมมะลิ
 

 

No. 3



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

แล้วตรงไหนที่บอกว่ารูปไม่แสดงครับ copy
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-02-10 12:57:05 By : webmaster
 


 

No. 4

Guest


ตรงที่วงสีแดงไว้ค่ะ

นี่ค่ะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-02-10 13:07:53 By : ข้าวหอมมะลิ
 


 

No. 5



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

ตรงไหนของ code ครับ ที่แสดงรูป
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-02-10 13:23:45 By : webmaster
 


 

No. 6

Guest


Code (PHP)
<?
	session_start();
	session_register('s_login');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ร้านจำหน่ายปลาสวยงามและอุปกรณ์ทุกชนิด</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin=0 topmargin=0 bgcolor="#BFA487">
<?
	include "connect.php";	
	$sql2 ="select  *  from product where stock >= '1' and status='y' order by product_id  desc" ;
	$result2 =mysql_db_query ($db,$sql2);
	$num=mysql_num_rows ($result2) ;
	if ($num>0) {
		echo "<table border='0' align='left' cellpadding='4' cellspacing='1'>";
		$check=1;
		while($rs2=mysql_fetch_array($result2)){
			$product_id=$rs2[product_id];
			$product_id_code=sprintf ("%01d" ,$product_id);
			$product_name=$rs2[product_name];
			$product_price=$rs2[product_price];
			$picture=$rs2[picture];
			$number =$product_price;
			$number2=number_format($number,2,'.',','); 
			
			if ($number2 <> 0){
				$x=$number2 ."&nbsp;บาท";
				}else{
				$x="สนใจติดต่อ";
				}

			if ($check%3 ==1) {
				echo "<tr>";
			}
			echo"
			<td width='100' lign=left valign=top> 
			<table width='230' height='200' border='1' cellpadding='0' cellspacing='0' bordercolor='#f3f3f3'>
    <tr> 
      <td width='230' bgcolor='#f3f3f3'><p align='left' class='p'>
          <b>ชื่อสินค้า : </b>$product_name </p></td>
    </tr>
    <tr> 
      <td lign=left valign=top><div align='center'>$picture</a></div></td>
    </tr>
    <tr> 
      <td bgcolor='#f3f3f3'><p align='lift' class='p'><b>ราคา : </b> $x <br>
          <img src='images/icon_01.gif' width='9' height='9'> <a href = 'product_view.php?show_id=$product_id'>แสดงรายละอียด</a>
		  <img src='images/icon_01.gif' width='9' height='9'> <a href='basket_add.php?product_id=$product_id'>หยิบใส่ตะกร้า</a></p></td>
    </tr>
  </table></td>
			";
			if ($check %3 ==0) {
				echo "</tr>";
				$check=0;
			}
			$check++;
		}
		echo"</table>";
	}
?>

</body>
</html>

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-02-10 13:43:35 By : ข้าวหอมมะลิ
 


 

No. 7



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

หา <img ไม่เจอครับ งง
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-02-10 14:00:57 By : webmaster
 


 

No. 8

Guest


กำมันงงบรรทัดไหนล่ะทีนี้อิอิ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-02-10 14:09:59 By : ข้าวหอมมะลิ
 


 

No. 9

Guest


ระบบตร้าสินค้ารหัสสินค้าไม่แสดงค่ะ ทำไงดี
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-05-26 17:39:47 By : sukunya
 


 

No. 10



โพสกระทู้ ( 156 )
บทความ ( 0 )



สถานะออฟไลน์


ตรง $picture ให้ใส่ <img src="$picture"> ประมาณนี้ครับ

ลองแปลงเอา
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-05-26 20:04:23 By : showroom
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยด้วยนะคะคือ ระบบตะกร้าสินค้า เรามีปัญหาค่ะรูปไม่ขึ้นค่ะ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 03
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่