|
 |
|
ช่วยดูโค้ดตัวนี้ให้ผมที่ครับมันเพิ่มข้อมูลไม่ได้แต่อัพเดทได้ |
|
 |
|
|
 |
 |
|
<?php
ob_start();
session_start();
require("connect/connect.php");
require("connect/function.php");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<?
echo $_GET["OrderNo"];
echo $_POST["txtName"];
echo $_POST["txtEmail"];
echo $_POST["txtTel"];
echo $_FILES["filUpload"]["name"];
echo $_POST["txtDesc"];
// echo date("Y-m-d H:i:s")
//if(move_uploaded_file($_FILES["filUpload"]["tmp_name"],"picture/".$_FILES["filUpload"]["name"]))
if(copy($_FILES["filUpload"]["tmp_name"],"admin/picture/".$_FILES["filUpload"]["name"]))
{
echo "<center>Copy/Upload Complete<br></center>";
$strSQL = "INSERT INTO conslip ";
$strSQL .="(OrderNo,name_sl,mail_sl,tel_sl,picture,detail_sl) VALUES ('".$_GET["OrderNo"]."','".$_POST["txtName"]."','".$_POST["txtEmail"]."','".$_POST["txtTel"]."','".$_FILES["filUpload"]["name"]."','".$_POST["txtDesc"]."'";
$objQuery = mysql_query($strSQL);
}
echo "<center><br><br>กำลังทำการบันทึกข้อมูลกรุณารอ.........";
$strSQL = "UPDATE cusorder ";
$strSQL .=" SET status = '3' WHERE OrderNo='".$_GET["OrderNo"]."' ";
$objQuery = mysql_query($strSQL);
echo "<center><br><br>ระบบแจ้งการยืนยันการชำระเงินไปยังผู้ขายแล้ว";
//echo "<meta http-equiv=\"refresh\" content=\"3; url=user_view.php\" />\n";
?>
</body>
</html>
คือผมต้องการเพิ่มข้อมูลในตาราง conslip แล้วก็ไปทำการอัพเดทสถาณะที่ตาราง cusorder ( ข้อมุลในตาราง cusorder อัพเดตตามค่าที่ส่งไปแต่ในตาราง conslip ว่างเปล่าไม่มีอะไรเข้าไปเลย ลอง echo ค่าที่ส่งมาจาก from ก็มาครบหมดตามที่เขียนไว )
Tag : PHP

|
|
 |
 |
 |
 |
Date :
2011-10-07 14:50:38 |
By :
kittichai29 |
View :
8791 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
วงเล็บปิดหายไป อันนึง คับ
|
 |
 |
 |
 |
Date :
2011-10-07 15:49:24 |
By :
pumin99 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับ
( ที่แท้ตรงนี้เองหาตั้งหลายรอบว่าใส่ครบแล้วนะ )
|
 |
 |
 |
 |
Date :
2011-10-08 13:43:24 |
By :
kittichai29 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|