01.
<meta charset=
"utf8"
>
02.
<body>
03.
<div
class
=
"container"
style=
"margin-top:30px"
>
04.
<?php
05.
if
(
$_SESSION
[
'st_id'
] ==
""
) {
06.
?>
07.
<div
class
=
"alert alert-danger"
>
08.
<strong>กรุณา Login เพื่อเข้าสู่ระบบ !</strong>
09.
</div>
10.
<?php
11.
exit
();
12.
}
13.
require_once
"connect_db.php"
;
14.
$id
=
$_POST
[
'student_id'
];
15.
$sql
=
"SELECT * FROM student where sutdent_id=$id"
;
16.
$result
= mysqli_query(
$conn
,
$sql
);
17.
$row
= mysqli_fetch_assoc(
$result
);
18.
?>
19.
<div
class
=
"studentform"
>
20.
<div
class
=
"page-header"
>
21.
<h3>
22.
รหัสนักเรียน :<?php
echo
$row
[
"st_id"
];?>
23.
24.
ชื่อ :<?php
echo
$row
[
"st_Name"
];?>
25.
 
26.
นามสกุล :<?php
echo
$row
[
"st_LastName"
];?>
27.
<br>
28.
<br>
29.
ระดับชั้น :<?php
echo
$row
[
"st_Level"
];?>
30.
31.
ห้อง :<?php
echo
$row
[
"st_Room"
];?>
32.
33.
<h2>ข้อมูลความประพฤติ</h2>
34.
35.
<div
class
=
"container"
style=
"margin-top:30px"
>
36.
<?php
37.
if
(
$_SESSION
[
'st_id'
] ==
""
) {
38.
?>
39.
<?php
40.
exit
();
41.
}
42.
require_once
"connect_db.php"
;
43.
$id
=
$_GET
[
'st_id'
];
44.
$sql
=
"SELECT * FROM conduct where st_id=$id "
;
45.
$result
= mysqli_query(
$conn
,
$sql
);
46.
?>
47.
<div
class
=
"table-responsive"
>
48.
<table
class
=
"table table-striped "
>
49.
<thead>
50.
<tr>
51.
<th>วันที่</th>
52.
<th>ความประพฤติ</th>
53.
<th>คะแนน</th>
54.
<th>ผู้บันทึก</th>
55.
</tr>
56.
</thead>
57.
<tbody>
58.
<?php
59.
while
(
$row
= mysqli_fetch_assoc(
$result
)) {
60.
?>
61.
<tr>
62.
<td><?php
echo
$row
[
"conduct_Time"
];?></td>
63.
<td><?php
echo
$row
[
"conduct_Happening"
];?></td>
64.
<td><?php
echo
$row
[
"conduct_Score"
];?></td>
65.
<td><?php
echo
$row
[
"conduct_SaveName"
];?></td>
66.
</tr>
67.
</body>
68.
<?php
69.
}
70.
mysqli_close(
$conn
);
71.
?>
72.
</tbody>
73.
</table>
74.
</div>
75.
<td>
76.
</h3>
77.
</body>