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 : 067984



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



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




Code (PHP)
<html>
<head>
<title>Unicity</title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<script language="javascript">
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
</script>
<style>
BODY <?php
include("paging.inc.php");
include "dbconfig.php";
conndb();
$sqltxt = "SELECT * FROM product"; 
$result = mysql_query ( $sqltxt, $conn ); 
$rs = mysql_fetch_array ( $result );

?>



{
    FONT-FAMILY: Arial, Helvetica, sans-serif
}
</style>
</head>

<body>
<center><b><u><font size="5">หน้าแสดงรายการสินค้า</font></u></b></center><br><br>
<center>[ <a href="cart.php" onClick="NewWindow(this.href,'name','600','400','yes');return false">ตะกร้าสินค้า</a> ] [ <a href="manageorder.php">แสดงรายการคำสั่งซื้อ</a> ]</center>
<br>
<br>
<center>



  <table width="60%" height="149" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111" id="AutoNumber1" style="border-collapse: collapse">
 
  <tr>
   
    <td width="51%" bgcolor="#CCCCFF" align="center" height="20"><b>
    <font color="#000080">รายละเอียดสินค้า</font></b></td>
    <td width="14%" bgcolor="#CCCCFF" align="center" height="20"><b>
    <font color="#000080">สั่งซื้อ</font></b></td>
  </tr>
 
    <?
while($rs = mysql_fetch_array($result))
{
?>
  <tr>
    
<td width="51%" align="center" height="128">
    <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0" bordercolor="#111111" id="AutoNumber2" style="border-collapse: collapse">
    

      <tr>
        <td colspan="3" align="left"><strong><font size="4" color="#800000">
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;รหัสสินค้า</font> <font size="4" color="#800000">:</font><font size="4" color="#000080"><?php echo $rs["pro_id"] ?></font>          
        </strong>          
          <p><strong><font size="4" color="#800000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ชื่อสินค้า :</font>          <font size="4" color="#000080"><?php echo $rs["productName"] ?></font>
            </strong></p>
          <p>          <strong><font size="4" color="#800000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ราคา :</font><font size="4" color="#000080"> <?php echo $rs["productPrice"]  ?>&nbsp; บาท</font>
            </strong>            </p>
          <p><strong><font size="4" color="#800000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PV ต่อชิ้น :</font><font size="4" color="#000080">
            <?php echo $rs["productPV"] ?></font>
          </strong>          </p>
          <p><strong><font size="4" color="#800000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;เหลือ :</font><font size="4" color="#000080"><?php echo $rs["inventory"] ?>&nbsp; ชิ้น</font></strong></p></td>
           
      </tr>
      <br>
      </table>
    
    </td>
    
    <td width="14%" align="center" height="128"><b>
    <font color="#000080"><a href="order.php?product_id=5" onClick="NewWindow(this.href,'name','600','400','yes');return false">[สั่งซื้อ]</a></font></b></td>
  </tr>
<?
}
?>

</table>
</center>
<br><br>
<center></center>
</body>
</html>




Tag : PHP







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2011-10-12 21:41:16 By : outlaww View : 755 Reply : 1
 

 

No. 1



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

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

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


บทเรียนมีไว้อ่านครับ

https://www.thaicreate.com/community/php-mysql-pagination.html
https://www.thaicreate.com/php/php-mysql-list-record-paging.html






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2011-10-13 06:32:42 By : ikikkok
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
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 อัตราราคา คลิกที่นี่