01.
<?php
02.
session_start();
03.
?>
06.
<head>
07.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
08.
<title>Untitled Document</title>
09.
</head>
10.
11.
<body>
12.
<?php
13.
include
(
"config.php"
);
14.
$id_order
=
$_POST
[
"id_order"
];
15.
if
(trim(
$_FILES
[
"file"
][
"tmp_name"
]) !=
""
&&(
$_FILES
[
"file"
][
"type"
] ==
"images/jpeg"
))
16.
{
17.
if
(move_uploaded_file(
$_FILES
[
"file"
][
"tmp_name"
],
"fileOrder/"
.
$id_order
.
".jpg"
))
18.
{
19.
$sql
=
"INSERT INTO tb_pay(id_order,pay_photo) values('$id_order','"
.
$id_order
.
"')"
;
20.
$rs
=mysql_db_query(
$DBName
,
$sql
);
21.
22.
}
23.
}
24.
25.
mysql_close();
26.
echo
"<script>alert('ขอบคุณค่ะ ทางร้านเราจะรีบตรวจสอบข้อมูลและส่งสินค้าให้ค่ะ');window.location='index.php';</script>"
;
27.
28.
?>
29.
</body>
30.
</html>