01.
session_start();
02.
if
(
$_SESSION
[
'UserID'
] ==
""
)
03.
{
04.
echo
"กรุณาเข้าระบบก่อน"
;
05.
exit
();
06.
}
07.
mysql_connect(
"localhost"
,
"root"
,
"1234"
);
08.
mysql_select_db(
"vdoclip"
);
09.
mysql_query(
"SET character_set_results=tis620"
);
10.
mysql_query(
"SET character_set_client=tis620"
);
11.
mysql_query(
"SET character_set_connection=tis620"
);
12.
13.
if
(
$_POST
[
"txtPassword"
] !=
$_POST
[
"txtConPassword"
])
14.
{
15.
echo
"ÃËÑʼèÒ¹äÁèµÃ§¡Ñ¹!"
;
16.
exit
();
17.
}
18.
$strSQL
=
"UPDATE member SET Password = '"
.trim(
$_POST
['txtPassword
'])."'
19.
,Name =
'".trim($_POST['
txtName
'])."'
,Sex =
'".trim($_POST['
txtSex
'])."'
,Email =
'".trim($_POST['
txtEmail
'])."'
,Tel =
'".trim($_POST['
txtTel
'])."'
,Address =
'".trim($_POST['
txtAddress
'])."'
WHERE UserID =
'".$_SESSION["UserID"]."'
";
20.
$objQuery
= mysql_query(
$strSQL
);