01.
<table
class
=
"table table-striped table-bordered table-hover"
>
02.
<?php
03.
04.
$strSQL
= "SELECT distinct information_student.Class_ID, information_student.classroom_id, information_student.year_id, class_student.abbreviation_class , classroom_student.classroom_name
05.
FROM information_student, class_student, classroom_student
06.
WHERE information_student.year_id=
'".$_GET['
item
']."'
AND
07.
information_student.Class_ID=class_student.Class_ID AND
08.
information_student.classroom_id=classroom_student.classroom_id
09.
ORDER BY information_student.Class_ID, information_student.classroom_id";
10.
$objQuery
= mysql_query(
$strSQL
);
11.
while
(
$row
= mysql_fetch_array(
$objQuery
)){
12.
13.
echo
"<tr><td width='437'>"
.
$row
[
'abbreviation_class'
].
"/"
.
$row
[
'classroom_name'
].
"<br>"
;
14.
15.
16.
$strSQL01
= "SELECT information_student.UserID_student, member_student.sex_student, member_student.name_student, information_student.Class_ID, information_student.classroom_id, information_student.year_id, class_student.abbreviation_class , classroom_student.classroom_name
17.
FROM information_student, class_student, classroom_student, member_student
18.
WHERE information_student.year_id=
'".$_GET['
item
']."'
AND
19.
information_student.UserID_student=member_student.UserID_student AND
20.
information_student.Class_ID=
'".$row['
Class_ID
']."'
AND
21.
information_student.classroom_id=
'".$row['
classroom_id
']."'
AND
22.
information_student.Class_ID=class_student.Class_ID AND
23.
information_student.Status_ID=
'1'
AND
24.
information_student.classroom_id=classroom_student.classroom_id
25.
ORDER BY information_student.Class_ID, information_student.classroom_id";
26.
$objQuery01
= mysql_query(
$strSQL01
);
27.
28.
while
(
$row01
= mysql_fetch_array(
$objQuery01
)){
29.
30.
echo
"<input type='checkbox' name='UserID_student["
.
$row01
['UserID_student
']."]'
value=
'". $row01['
UserID_student
'] ."'
checked><input name=
''
type=
'text'
value=
'".$row01['
UserID_student
']."'
size=
'35'
><br>";
31.
32.
}
33.
34.
35.
36.
echo
"</td>
37.
<td width=
'437'
>";
38.
39.
echo
" <select
class
=
'form-control'
name=
'Class_ID[]'
>
40.
<option value=
''
>-- เลือกชั้นเรียน --</option>";
41.
42.
43.
$strSQL02
=
"SELECT * FROM class_student "
;
44.
$objQuery02
= mysql_query(
$strSQL02
);
45.
46.
while
(
$row02
= mysql_fetch_array(
$objQuery02
)){
47.
48.
echo
"<option value='"
.
$row02
['Class_ID
']."'
>".
$row02
[
'Class_name'
].
"</option>"
;
49.
50.
}
51.
52.
53.
54.
echo
"</select>"
;
55.
56.
57.
echo
" <select
class
=
'form-control'
name=
'classroom_id[]'
>
58.
<option value=
''
>-- เลือกห้องเรียน --</option>";
59.
60.
61.
$strSQL03
=
"SELECT * FROM classroom_student "
;
62.
$objQuery03
= mysql_query(
$strSQL03
);
63.
64.
while
(
$row03
= mysql_fetch_array(
$objQuery03
)){
65.
66.
echo
"<option value='"
.
$row03
['classroom_id
']."'
>".
$row03
[
'classroom_name'
].
"</option>"
;
67.
68.
}
69.
70.
71.
72.
echo
"</select>"
;
73.
echo
"</td></tr>"
;
74.
75.
}
76.
77.
78.
?>
79.
80.
81.
<tr><td><div align=
"center"
>
82.
83.
<button type=
"button"
class
=
"btn btn-primary"
onClick=
"history.back();"
>Back Button</button>
84.
<button type=
"submit"
class
=
"btn btn-primary"
>Save Button</button>
85.
86.
</div></td></tr>
87.
88.
</table>