01.
<?
02.
03.
include
(
"config.inc.php"
) ;
04.
$strSQL
=
"UPDATE student SET "
;
05.
$strSQL
.=
"Student_id = '"
.
$_POST
[
"txtStu_id"
].
"' "
;
06.
$strSQL
.=
",Card_id = '"
.
$_POST
[
"txtCard_id"
].
"' "
;
07.
$strSQL
.=
",Name = '"
.
$_POST
[
"txtName"
].
"' "
;
08.
$strSQL
.=
",Lastname = '"
.
$_POST
[
"txtL_name"
].
"' "
;
09.
$strSQL
.=
",Nickname = '"
.
$_POST
[
"txtN_name"
].
"' "
;
10.
$strSQL
.=
",Birthday = '"
.
$_POST
[
"txtB_date"
].
"' "
;
11.
$strSQL
.=
",Sex = '"
.
$_POST
[
"txtrdoSex"
].
"' "
;
12.
$strSQL
.=
",Class = '"
.
$_POST
[
"txtClass"
].
"' "
;
13.
$strSQL
.=
",Relegion = '"
.
$_POST
[
"txtRel"
].
"' "
;
14.
$strSQL
.=
",Wi = '"
.
$_POST
[
"txtWi"
].
"' "
;
15.
$strSQL
.=
",Hi = '"
.
$_POST
[
"txtHi"
].
"' "
;
16.
$strSQL
.=
",Grade = '"
.
$_POST
[
"txtGrade"
].
"' "
;
17.
$strSQL
.=
",Deci = '"
.
$_POST
[
"txtDec"
].
"' "
;
18.
$strSQL
.=
",Scho = '"
.
$_POST
[
"txtScho"
].
"' "
;
19.
$strSQL
.=
",Family = '"
.
$_POST
[
"txtFamily"
].
"' "
;
20.
$strSQL
.=
",Family_id = '"
.
$_POST
[
"txtF_id"
].
"' "
;
21.
$strSQL
.=
",Hoby = '"
.
$_POST
[
"txtHoby"
].
"' "
;
22.
$strSQL
.=
",Talent = '"
.
$_POST
[
"txtTalent"
].
"' "
;
23.
$strSQL
.=
",Address = '"
.
$_POST
[
"txtAddress"
].
"' "
;
24.
$strSQL
.=
"WHERE Student_id = '"
.
$_GET
[
"txtStu_id"
].
"'"
;
25.
mysql_query(
$strSQL
)
or
die
(mysql_error());
26.
if
(
$objQuery
)
27.
{
28.
echo
"<br> <br><br><br><center>บันทึกข้อมูลเรียบร้อยแล้ว.</center>"
;
29.
echo
"<center><a href='view.php'>คลิ๊กเพื่อกลับสู่หน้าข้อมูลนักเรียน</a></center>"
;
30.
31.
}
32.
33.
34.
else
35.
{
36.
echo
"Error Save ["
.
$strSQL
.
"]"
;
37.
}
38.
39.
?>