 |
|
(โค้ด PHP )
<?php
include "../ConnectionDb.php";
$str_sql1 ="SELECT MAX(pr_order) AS now_id FROM pr_decription";
mysql_query("SET NAMES tis620");
$result1=mysql_query($str_sql1);
$rs1=mysql_fetch_array($result1);
$pr_order =$rs1['now_id']+1;
?>
<?php
include "../ConnectionDb.php";
$str_sql2 ="SELECT MAX(DocNo ) AS now_Do FROM pr_decription";
mysql_query("SET NAMES tis620");
$result2=mysql_query($str_sql2);
$rs2=mysql_fetch_array($result2);
$DocNo=$rs2['now_Do']+1;
?>
<?php
@session_start("login_true_mem");
include("../ConnectionDb.php");
$date = date( "Y-m-d" );
$year = date( "Y" );
$m=date("m");
$sql2 = "insert into pr_decription (DocNo,pr_order,login_true_mem,date,get_date,year,type) values( '$DocNo2 ','$pr_order','$login_true_mem','$date','$get_date','$year','$type')";
mysql_query("SET NAMES tis620");
mysql_query($sql2) or die($sql2."".mysql_error());
for($i=0;$i<count($_POST["decription_n"]);$i++)
{
$sql = "insert into decription (DocNo,pr_order,decription_n, unit,quantity,price_unit,shop,job,memo_dec,vat) values('".$_REQUEST[DocNo]."','".$_REQUEST[pr_order]."','$decription_n[$i]', '$unit[$i]','$quantity[$i]', '$price_unit[$i]','$shop[$i]','$job[$i]','$memo_dec[$i]','$vat[$i]')";
mysql_query("SET NAMES tis620");
mysql_query($sql) or die($sql."".mysql_error());
}
?>
<html>
<head>
<title>Order Complete</title>
<meta http-equiv=refresh content=4;URL=index2.php>
<link rel=stylesheet href=cart.css type=text/css>
<style type="text/css">
</head>
<body background=img/bkg.gif>
<p class=Tahoma align=center ><img src="../images/tkk.PNG" width="265" height="171">
<p align=center class=Tahoma ><b><u><font color="#FF9900" size="6">การขอซื้อสินค้าเรียบร้อยแล้ว</FONT></u></b><br>
<p class=Tahoma align=center ><span class="style1"> <font size="4">.....โปรดรอการติดต่อกลับจากแผนกจัดซื้อ.....</FONT></span>
<br>
<b> ขอขอบคุณที่ใช้บริการ</b>
</body>
</html>
|
 |
 |
 |
 |
Date :
2009-09-22 14:52:40 |
By :
T_T |
|
 |
 |
 |
 |
|
|
 |