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 > ช่วยดู ต่อให้หน่อยครับ (มือใหม่หัดเขียน) คือผมทโปรแกรมตะกร้าสินค้านะครับ...นี้คือหน้าแรก หน้าต่อไป



 

ช่วยดู ต่อให้หน่อยครับ (มือใหม่หัดเขียน) คือผมทโปรแกรมตะกร้าสินค้านะครับ...นี้คือหน้าแรก หน้าต่อไป

 



Topic : 032363



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



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




คือผมทโปรแกรมตะกร้าสินค้านะครับ...นี้คือหน้าแรก หน้าต่อไป ผม นึกไม่ออกครับ ว่าจะทำไงต่อ ผมได้ดึงข้อมูลมาจากฐานข้อมูลมาโชว์ แล้ว กดปุ่มสั่งซื้อ .ตรงนี้ ละ ครับที่ติดปัญหา.......ยังไง ก็ ช่วย แนะนำ ผม หน่อย นะ ครับ

Code (PHP)
<html>
<head>
<title>My Shop - หน้าแสดงรายการสินค้า</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 {
    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></center>
<br><br>
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="60%" id="AutoNumber1" height="149">
  <tr>
    <td width="35%" bgcolor="#CCCCFF" align="center" height="20"><b>
    <font color="#000080">ภาพสินค้า</font></b></td>
    <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>
   <?php
include("config.inc.php");

// คำสั่ง SQL ที่ใช้ในการเลือกข้อมูลที่อยู่ในฐานข้อมูลกลับมา (เรียงตามลำดับ ID)
$strSQL="SELECT * FROM product";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");

/* ในลูปด้านล่าง เทียบได้กับการดึงข้อมูลมาทีละ 1 Record เพื่อนำมาแสดงผลทางหน้าจอ */
while($objResult = mysql_fetch_array($objQuery))
{
?>
  <tr>
    <td width="35%" align="center" height="128">
    <a href="photo/<?=$objResult["FilesName"];?>">
<img src="photo/<?=$objResult["Thumbnails"];?>" border="0"></a></center></td>    </td>
<td width="51%" align="center" height="128">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" >
      <tr>
	 
<tr>
        <td width="27%" align="right">
        <p align="right"><font size="2" color="#800000">
        รหัสสินค้า :</font></td>
        <td width="3%">&nbsp;</td>
        <td width="70%"><font size="2" color="#000080"><?php echo $objResult['id'] ; ?></font></td>
      </tr>
      <tr>
        <td width="27%" align="right">
        <p align="right"><font size="2" color="#800000">
        ชื่อสินค้า :</font></td>
        <td width="3%">&nbsp;</td>
        <td width="70%"><font size="2" color="#000080"><?php echo $objResult['name'] ; ?></font></td>
      </tr>
      <tr>
        <td width="27%" align="right">
        <font size="2" color="#800000">
        ประเภทสินค้า :</font></td>
        <td width="3%">&nbsp;</td>
        <td width="70%"><font size="2" color="#000080"><?php echo $objResult['type'] ; ?></font></td>
      </tr>
      <tr>
        <td width="27%" align="right">
        <font size="2" color="#800000">
        ราคา :</font></td>
        <td width="3%">&nbsp;</td>
        <td width="70%"><font size="2" color="#000080"><?php echo $objResult['price'] ; ?></font><font size="2" color="#000080">&nbsp;บาท/ตัว</td>
      </tr>
      <tr>
        <td width="27%" align="right">
        <font size="2" color="#800000">รุ่น
        :</font></td>
        <td width="3%">&nbsp;</td>
        <td width="70%"><font size="2" color="#000080"><?php echo $objResult['model'] ; ?></font></td>
      </tr>
      <tr>
        <td width="27%" align="right">
        <font size="2" color="#800000">
        คงเหลือ :</font></td>
        <td width="3%">&nbsp;</td>
        <td width="70%"><font size="2" color="#000080"><?php echo $objResult['amount'] ; ?></font>
		<font size="2" color="#000080">&nbsp; ตัว</td>
      </tr>
      <tr>
        <td width="27%" align="right">
        <font size="2" color="#800000">

        สี :</font></td>
        <td width="3%">&nbsp;</td>
        <td width="70%"><font size="2" color="#000080"><?php echo $objResult['color'] ; ?></font></td>
      </tr>
    </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> 

    

 <?php
}
?>
  </tr>
 
</table>
</center>
<br><br>
</body>
</html>




Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-09-29 04:31:55 By : kittioof View : 914 Reply : 1
 

 

No. 1



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

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

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


Quote:
หน้าต่อไป ผม นึกไม่ออกครับ ว่าจะทำไงต่อ

ลองศึกษาจากตัวนี้ดูมั้ยครับ >> Ajax Shopping Cart






Date : 2009-09-29 08:15:03 By : panyapol
 

   

ค้นหาข้อมูล


   
 

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