|
|
|
ถ้าอยากจะแสดงข้อมูลออกมาเป็นหน้าๆ จะต้องใส่โค้ดอะไรที่ไหนบ้างครับ |
|
|
|
|
|
|
|
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">
รหัสสินค้า</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"> ชื่อสินค้า :</font> <font size="4" color="#000080"><?php echo $rs["productName"] ?></font>
</strong></p>
<p> <strong><font size="4" color="#800000"> ราคา :</font><font size="4" color="#000080"> <?php echo $rs["productPrice"] ?> บาท</font>
</strong> </p>
<p><strong><font size="4" color="#800000"> PV ต่อชิ้น :</font><font size="4" color="#000080">
<?php echo $rs["productPV"] ?></font>
</strong> </p>
<p><strong><font size="4" color="#800000"> เหลือ :</font><font size="4" color="#000080"><?php echo $rs["inventory"] ?> ชิ้น</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
|
|
|
|
|
|
Date :
2011-10-12 21:41:16 |
By :
outlaww |
View :
778 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|