01.
<?
02.
for
(
$i
=1;
$i
<=(int)(
$_POST
[
"hdnLine"
]);
$i
++)
03.
{
04.
if
(
$_FILES
[
"fileUpload"
.
$i
][
"name"
] !=
""
)
05.
{
06.
if
(move_uploaded_file(
$_FILES
[
"fileUpload"
.
$i
][
"tmp_name"
],
"images/"
.
$_FILES
[
"fileUpload"
.
$i
][
"name"
]))
07.
{
08.
include
'config/connectnomal.php'
;
09.
$strSQL
=
"UPDATE page_store SET "
;
10.
$strSQL
.=
"page_cInvCCode = '"
.
$_POST
[
"txtpd_cod"
].
"' "
;
11.
$strSQL
.=
",banner_primary = '"
.
$_FILES
[
"fileUpload1"
].
"' "
;
12.
$strSQL
.=
",banner_secondary = '"
.
$_FILES
[
"fileUpload2"
].
"' "
;
13.
$strSQL
.=
",banner_tertiary = '"
.
$_FILES
[
"fileUpload3"
].
"' "
;
14.
$strSQL
.=
",eyewear_hero = '"
.
$_FILES
[
"fileUpload4"
].
"' "
;
15.
$strSQL
.=
"WHERE page_cInvCCode = '"
.
$_GET
[
"cat_id"
].
"' "
;
16.
$objQuery
= mssql_query(
$strSQL
);
17.
}
18.
}
19.
}
20.
if
(
$objQuery
)
21.
{
22.
echo
"<center>Save Done.</center>"
;
23.
}
24.
else
25.
{
26.
echo
"<center>Error Save ["
.
$strSQL
.
"]</center>"
;
27.
}
28.
?>