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,027

HOME > PHP > PHP Forum > ช่วยดูโค้ดหน่อยครับ คือต้องการให้ข้อมูลหน้าtest.php ตรงกับหน้าdetail.phpครับ ตอนนี้ไม่ตรงกันครับ



 

ช่วยดูโค้ดหน่อยครับ คือต้องการให้ข้อมูลหน้าtest.php ตรงกับหน้าdetail.phpครับ ตอนนี้ไม่ตรงกันครับ

 



Topic : 115200



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



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




หน้าtest.php

Code (PHP)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
</head>

<body>

<? 
include"connect.php";
$strSQL = "SELECT * FROM product ORDER BY id_pro ASC;";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$cols = 3; //กำหนดจำนวนคอลั่ม 
$c = $cols;
?>
<table width="558" height="123" border="0" align="center" cellspacing="0">
<tr>
<?
  while($objResult=mysql_fetch_array($objQuery)){    
$c --;
?>
<td width="150" height="27"><div align="center"><div align="center"><a href="detail.php?=<?php echo $row_select['id_pro'] ; ?>"</a><img src="product/uploaded/<?php echo $objResult["image1_pro"];?>" width="179" height="186" border="0"><br>
      <span class="style1"><strong>ชื่อสินค้า :</strong> 
      <?=$objResult[brand_pro]?>       
      <br>
      <strong>ราคา :</strong> 
      <?=$objResult[price_pro];?>
      </span></div></td> 
<?
if($c == 0) {
$c = $cols;
?>
</tr><td height="29"></tr>
<? } } ?>
<td height="33"></tr></table>

</body>
</html>



//////////////////detail.php///////////////////////

Code (PHP)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>.::รายละเอียดข้อมูลสินค้า::.</title>
<style type="text/css">
<!--
.style1 {font-weight: bold}
.style2 {font-weight: bold}
.style3 {font-weight: bold}
.style4 {font-weight: bold}
.style5 {
	color: #000000;
	font-weight: bold;
}
.style7 {font-size: 14px}
-->
</style>
</head>
<body>
<table width="1005" height="779" border="1" align="center" cellpadding="0" cellspacing="1">
  <tr>
    <td width="1027" valign="top"><table width="1001" height="143" border="0" cellpadding="0" cellspacing="0">
 <tr> 
           <td> <?php require_once('head.php'); ?></td>
        </tr>
    </table>
      <table width="1001" height="420" border="1" cellpadding="0" cellspacing="1">
        <tr>
          <td width="200"></td>
          <td width="792" valign="top">
            <div align="center">
                       
              <?
include"connect.php";
$strSQL = "SELECT * FROM product";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$row_select = mysql_fetch_array($objQuery) ;
?> 
              <span class="style5">ข้อมูลรถมอเตอร์ไซค์            </span></div>
            <form id="form1" name="form1" method="post" action="">
<table width="839" height="138" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><img src="product/uploaded/<?php echo $row_select["image1_pro"];?>" width="163" height="163" border="0"></td>
    <td valign="top"><img src="product/uploaded/<?php echo $row_select["image2_pro"];?>" width="163" height="163" border="0"></td>
    <td valign="top"><img src="product/uploaded/<?php echo $row_select["image3_pro"];?>" width="163" height="163" border="0"></td>
    <td valign="top"><img src="product/uploaded/<?php echo $row_select["image4_pro"];?>" width="163" height="163" border="0"></td>
    <td valign="top"><img src="product/uploaded/<?php echo $row_select["image5_pro"];?>" width="163" height="163" border="0"></td>
  </tr>
</table>
<table width="469" height="223" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td> <p align="center"><strong>รายละเอียดข้อมูลรถมอเตอร์ไซค์</strong></p>
      <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
          <td><strong>รหัสฝากขายสินค้า :</strong></td>
      <td><?php echo $row_select['id_pro'] ; ?></td>
    </tr>
    <tr>
      <td width="41%"><strong>ยี่ห้อรถมอเตอร์ไซค์ :</strong></td>
      <td width="59%"><?php echo $row_select['brand_pro'] ; ?></td>
    </tr>
    <tr>
      <td><strong>รุ่นของรถ : </strong></td>
      <td><?php echo $row_select['generate_pro'] ; ?></td>
    </tr>
    <tr>
      <td><strong>ปีที่จดทะเบียน  :</strong></td>
      <td><?php echo $row_select['registyear_pro'] ; ?></td>
    </tr>
    <tr>
      <td><strong>สีรถ :</strong></td>
      <td><?php echo $row_select['color_pro'] ; ?></td>
    </tr>
    <tr>
      <td><strong>ราคาที่ต้องการขาย :</strong></td>
      <td><?php echo $row_select['price_pro'] ; ?></td>
    </tr>
     <tr>
      <td><strong>วันที่ฝากขาย :</strong></td>
      <td><?php echo $row_select['date_pro'] ; ?></td>
    </tr>
  </table></td>
  </tr>
</table>

                                             &nbsp;&nbsp;&nbsp;
 &nbsp;  &nbsp;&nbsp;  &nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;  &nbsp;  &nbsp;&nbsp;
 <table width="182" height="31" border="0" align="center" cellpadding="0" cellspacing="0">
   <tr>
     <td width="69">&nbsp;</td>
     <td width="113"><div align="right"><span class="style7">
       <input type="image" name="imageField2" id="imageField2" src="image/shopping.gif">
       สั่งซื้อสินค้า </span></div></td>
   </tr>
 </table>
            </form>
          
          </td>
        </tr>
      </table>
      <table width="1001" height="73" border="1" cellpadding="0" cellspacing="1">
        <tr>
          <td><?php require_once('foot.php'); ?></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>





Tag : PHP, MySQL







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2015-03-18 12:24:33 By : newnot View : 918 Reply : 16
 

 

No. 1

Guest


ข้อมูล ?






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 13:07:29 By : pgm
 


 

No. 2



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



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


คือตอนนี้ งง ครับ ช่วยอธิบายให้เข้าใจหน่อยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 13:46:54 By : newnot
 

 

No. 3

Guest


ตอบความคิดเห็นที่ : 2 เขียนโดย : newnot เมื่อวันที่ 2015-03-18 13:46:54
รายละเอียดของการตอบ ::
คือ...... แบบว่า เราเองก็ไม่มีฐานข้อมูลของนายอ่ะ เราจะเอาโค้ดมารันก็ไม่ได้ใช่มั๊ยล่ะะ

เพราะฉะนั้น เราก็เลยไม่รู้ว่า มันจะออกมาหน้าตาเป็นยังไง แต่จะให้เราอ่านจากโค้ดของนาย
เราต้องสูญเสียกำลังภายในเกือบหมด..อ่ะ แล้วเราจะเอาแรงไหนทำงานต่อล่ะ

ทางที่ดีนายจับหน้าจอของโค้ดทีรันแล้วมาวางให้ดูจะดีก่าาา... เนอะๆๆ

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 14:02:47 By : ไม่ทราบแหล่งที่มา
 


 

No. 4



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



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


ex
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 14:06:37 By : newnot
 


 

No. 5



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



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


ขอบคุณคัฟๆ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 14:07:03 By : newnot
 


 

No. 6

Guest


ตอบความคิดเห็นที่ : 4 เขียนโดย : newnot เมื่อวันที่ 2015-03-18 14:06:37
รายละเอียดของการตอบ ::
...ทางที่ดีนายจับหน้าจอของโค้ดทีรันแล้วมาวางให้ดูจะดีก่าาา .......

ไม่ใช่ phpmyadmin ..... เอๆๆๆๆ เด็กสมัยนี้ มันคิดเร็วจนฟังเราไม่เข้าใจหรือป่าวน่ะ

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 14:11:37 By : ไม่ทราบแหล่งที่มา
 


 

No. 7



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



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


1
2
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 14:19:39 By : newnot
 


 

No. 8

Guest


แล้วววว ไม่ตรงกันอย่างไร....เหรอ เราเองก็ งงๆ ไม่เข้าใจที่ถาม
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 14:48:21 By : ไม่ทราบแหล่งที่มา
 


 

No. 9



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



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


คือกดเลือกสินค้าจากหน้าtestตัวไหน หน้าdetailก็เป็นสินค้าตัวเดิม ครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 15:18:20 By : newnot
 


 

No. 10

Guest


Quote:
// test.php

26. <td width="150" height="27"><div align="center"><div align="center"><a href="detail.php?id_prd=<?php echo $objResult['id_pro'] ; ?>"</a><img src="product/uploaded/<?php echo $objResult["image1_pro"];?>" width="179" height="186" border="0"><br>



Quote:
//detail.php

34. $strSQL = "SELECT * FROM product where id_prd='{$_GET["id_prd"]}' ";

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 15:27:34 By : ไม่ทราบแหล่งที่มา
 


 

No. 11



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



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


ขอบคุณมากๆๆๆๆๆๆๆๆๆๆๆครับบบบบ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 15:48:56 By : newnot
 


 

No. 12

Guest


ตอบความคิดเห็นที่ : 11 เขียนโดย : newnot เมื่อวันที่ 2015-03-18 15:48:56
รายละเอียดของการตอบ ::


แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 15:50:51 By : ไม่ทราบแหล่งที่มา
 


 

No. 13

Guest


จบแล้วสิน่ะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 15:51:51 By : pgm
 


 

No. 14

Guest


ตอบความคิดเห็นที่ : 13 เขียนโดย : pgm เมื่อวันที่ 2015-03-18 15:51:51
รายละเอียดของการตอบ ::
ปิดประเด็นครับ ...

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 15:53:20 By : ไม่ทราบแหล่งที่มา
 


 

No. 15



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



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


ขอบคุณมากครับ งมมาหลายวันแล้ว ขอบคุณอีกครั้งครับบ
e
r
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 18:10:52 By : newnot
 


 

No. 16



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

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

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


ตอบความคิดเห็นที่ : 15 เขียนโดย : newnot เมื่อวันที่ 2015-03-18 18:10:52
รายละเอียดของการตอบ ::
สวยครับ

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2015-03-18 18:22:18 By : sakuraei
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยดูโค้ดหน่อยครับ คือต้องการให้ข้อมูลหน้าtest.php ตรงกับหน้าdetail.phpครับ ตอนนี้ไม่ตรงกันครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ 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 00
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 อัตราราคา คลิกที่นี่