01.
<?
02.
$con
= mysql_connect(
"localhost"
,
"root"
,
"1234"
);
03.
if
(!
$con
)
04.
{
05.
die
(
'Could not connect: '
. mysql_error());
06.
}
07.
mysql_select_db(
"obec"
,
$con
);
08.
mysql_query(
"SET NAMES UTF8"
);
09.
$sql
=
"update k set status='0'where k1='$k1'"
;
10.
$result
= mysql_query(
$sql
)
or
die
(
'error'
);
11.
if
(!
$result
){
12.
echo
"???????????????????????"
;
13.
}
else
{
14.
$sql
=
"update pas set status='1'where pas_id='$pas_id'"
;
15.
$result
= mysql_query(
$sql
)
or
die
(
'error'
);
16.
if
((
$result
)){
17.
echo
"????????????????????"
;
18.
echo
"<meta http-equiv=refresh content=0.1;URL=index_admin_reportloan.php>"
;
19.
}
20.
}
21.
mysql_close(
$con
)
22.
?>