ช่วยดูโค้ดใบสั่งซื้อสินค้าค้าให้หน่อยน่ะค่ะทำไมถึงขึ้นแบบนี้อ่ะค่ะ ด่วนค่ะ ขอบคุณค่ะ
Code (PHP)
<?
require_once('function.php');
require_once('../Connections/conndb.php');
$orders_id=$_GET['orders_id'];
//หาข้อมูลสมาชิก
mysql_select_db($database_conndb, $conndb);
//$query_rsmember = "SELECT * FROM member WHERE member_id='$loginm_true' ";
$query_rsmember = "SELECT * FROM view_order_item2 WHERE member_id='$loginm_true' ";
$rsmember = mysql_query($query_rsmember, $conndb) or die(mysql_error());
$row_rsmember = mysql_fetch_assoc($rsmember);
$totalRows_rsmember = mysql_num_rows($rsmember);
$member_id=$row_rsmember['member_id'];
//$d2=$row_rsmember['transport_date'];//...............................................ค่าเวลาเป็นภาษาไทย
//หาหมายเลขใบสั่งซื้อ
mysql_select_db($database_conndb, $conndb);
$query_rsorders = "SELECT * FROM orders WHERE orders_id='$orders_id' ";//
$rsorders = mysql_query($query_rsorders, $conndb) or die(mysql_error());
$row_rsorders = mysql_fetch_assoc($rsorders);
$totalRows_rsorders = mysql_num_rows($rsorders);
$orders_id=$row_rsorders['orders_id'];
$order_id=sprintf("%05d",$orders_id);
$datebuy=$row_rsorders['datebuy'];
$transportprice=$row_rsorders['transportprice'];////...............................................ค่าเวลาเป็นภาษาไทย
mysql_select_db($database_conndb, $conndb);
$query_rsstock = "SELECT * FROM stock WHERE orders_id='$orders_id' ";
$rsstock = mysql_query($query_rsstock, $conndb) or die(mysql_error());
$row_rsstock = mysql_fetch_assoc($rsstock);
$totalRows_rsstock = mysql_num_rows($rsstock);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><? echo "$titles";?></title>
<link href="../css/textcolor.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
-->
</style></head>
<body>
<table width="200" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td><table width="804" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="788" height="40" align="center" bgcolor="#FFFFFF"><p> </p>
<p><strong>ใบสั่งซื้อสินค้า</strong></p>
<p><strong>ร้านข้าวแต๋นทวีพรรณ<br />
</strong><strong>81/1 หมู่ที่ 2 ต.นาแก้ว อ.เกาะคา จ.ลำปาง </strong></p></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF" class="black12text"><div align="left"><span class="black14"> หมายเลขใบสั่งซื้อ : <strong><?php echo "$order_id";?></strong></span> </div></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF" class="black12text"><div align="left">วันที่สั่งซื้อ :
<?php
echo dateThai("$datebuy");?>
</div></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF" class="black14"> </td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF" class="black14"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" bordercolor="1"><table width="390" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td><table width="390" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td height="30" colspan="2" align="left"> <strong class="black13text"> ข้อมูลสมาชิก</strong></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF" class="black12text"><strong>รหัสสมาชิก : </strong></td>
<td align="left" bgcolor="#FFFFFF" class="black12text">
<div align="left">
<?php
//$member_id=$row_rsmember['member_id'];
$member_id=sprintf("%05d",$member_id);
echo "$member_id"; ?>
<input name="member_id" type="hidden" id="member_id" value="<?php echo $row_rsmember['member_id']; ?>" />
</div></td>
</tr>
<tr>
<td width="109" align="right" bgcolor="#FFFFFF" class="black12text"><strong>ชื่อ : </strong></td>
<td width="266" align="left" bgcolor="#FFFFFF" class="black12text"><div align="left"><?php echo $row_rsmember['member_fname']; ?> <?php echo $row_rsmember['member_lname']; ?>
<input name="order_name" type="hidden" id="order_name" value="<?php echo $row_rsmember['member_fname']; ?><?php echo $row_rsmember['member_lname']; ?>" />
</div></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF" class="black12text"><strong>ที่อยู่ : </strong></td>
<td align="left" bgcolor="#FFFFFF" class="black12text"><div align="left"><?php echo $row_rsmember['member_addres']; ?>
<?php echo $row_rsmember['member_district']; ?>
<?php echo $row_rsmember['member_province']; ?>
<?php echo $row_rsmember['member_zip']; ?>
<input name="order_add" type="hidden" id="order_add" value="<?php echo $row_rsmember['member_addres']; ?>" />
</div></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF" class="black12text"><strong>เบอร์โทรศัพท์ : </strong></td>
<td align="left" bgcolor="#FFFFFF" class="black12text"><div align="left"><?php echo $row_rsmember['member_telmo']; ?></div></td>
</tr>
<tr>
<td align="right" bgcolor="#FFFFFF" class="black12text"><strong>อีเมล : </strong></td>
<td align="left" bgcolor="#FFFFFF" class="black12text"><div align="left"><?php echo $row_rsmember['member_email']; ?></div></td>
</tr><? // กิกิ?>
</table></td>
</tr>
</table> </td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF"><table width="792" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#FFFFFF">
<tr bordercolor="#000000" bgcolor="#000000">
<td align="center" bordercolor="1" bgcolor="#FFFFFF" class="black12text"><strong>รหัสสินค้า</strong></td>
<td align="center" bordercolor="1" bgcolor="#FFFFFF" class="black12text"><strong>รายการ</strong></td>
<td align="center" bordercolor="1" bgcolor="#FFFFFF" class="black12text"><strong>จำนวน</strong></td>
<td align="center" bordercolor="1" bgcolor="#FFFFFF" class="black12text"><strong>หน่วยละ</strong></td>
<td colspan="2" align="center" bordercolor="1" bgcolor="#FFFFFF" class="black12text"><strong>รวมเงิน </strong></td>
</tr>
<?php do {
$product_id=$row_rsstock['product_id'];
$orders_num=$row_rsstock['orders_num'];
$product_price=$row_rsstock['product_price'];
mysql_select_db($database_conndb, $conndb);
$query_rsproduct = "SELECT * FROM product WHERE product_id='$product_id' ";
$rsproduct = mysql_query($query_rsproduct, $conndb) or die(mysql_error());
$row_rsproduct = mysql_fetch_assoc($rsproduct);
$totalRows_rsproduct = mysql_num_rows($rsproduct);
?>
<tr>
<td width="89" align="left" bordercolor="1" bgcolor="#FFFFFF" class="black12text"><?php echo $row_rsproduct['product_code'];?></td>
<td width="360" align="left" bordercolor="1" bgcolor="#FFFFFF" class="black12text"><?php echo $row_rsproduct['product_name'];?></td>
<td width="89" align="center" bordercolor="1" bgcolor="#FFFFFF" class="black12text"><?php echo "$orders_num";?></td>
<td width="95" align="center" bordercolor="1" bgcolor="#FFFFFF" class="black12text"><?php echo "$product_price";?></td>
<td width="84" align="right" bordercolor="1" bgcolor="#FFFFFF" class="black12text"><?php
$total_unit=$orders_num*$product_price;
echo "$total_unit";
$total=$total+$total_unit;
?></td>
<td width="25" align="right" bordercolor="1" bgcolor="#FFFFFF" class="black12text">บาท</td>
</tr>
<?php } while ($row_rsstock = mysql_fetch_assoc($rsstock)); ?>
<tr>
<td colspan="4" align="right" bgcolor="#FFFFFF" class="black14"><span class="black13text"><strong>รวมเป็นเงิน</strong></span></td>
<td align="right" bordercolor="1"><span class="black13text">
<?php
$total2=number_format($total,2);
echo "$total2";
?>
</span></td>
<td align="right" bordercolor="1" class="black13text">บาท</td>
</tr>
<tr>
<td colspan="4" align="right" bgcolor="#FFFFFF" class="black14"><strong>รวมเป็นเงินทั้งสิ้น</strong></td>
<td align="right"><strong>
<?php
$total=($total-$discounts)+$transfer;
$total=number_format($total,2);
echo "$total";
?>
</strong></td>
<td align="right" class="black13text">บาท</td>
</tr>
</table>
<p align="left"> </p></td>
</tr>
<tr>
<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><table width="402" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="188" align="center"><input name="button" type="button" onclick="window.print();" value="พิมพ์ใบสั่งซื้อ" /></td>
<form id="form1" method="post" action="orderreport.php">
<td width="198" align="center"><label>
<input type="submit" name="Submit" value="กลับสู่หน้าหลัก" />
</label> </td>
</form>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
คือว่ามันขึ้น Error แบบนี่้อ่ะค่ะ
Code
Warning: require_once(function.php) [function.require-once]: failed to open stream: No such file or directory in E:\AppServ\www\Project1\ket\ordershow.php on line 2
Fatal error: require_once() [function.require]: Failed opening required 'function.php' (include_path='.;C:\php5\pear') in E:\AppServ\www\Project1\ket\ordershow.php on line 2
Tag : PHP
Date :
2013-03-08 01:16:14
By :
goy
View :
827
Reply :
1
ไฟล์ E:\AppServ\www\Project1\ket\ ordershow.php เนี่ย
มันไม่มีอยู่จริงครับ ลองเช็คดูว่าคุณเอาไฟล์ ordershow.php เนี่ยไปไว้ที่ไหน ซึ่งไม่ได้อยู่ใน E:\AppServ\www\Project1\ket\ แน่นอน
Date :
2013-03-08 02:20:32
By :
cookiephp
Load balance : Server 03