01.
<select name=
"room"
class
=
"input"
id=
"room"
>
02.
<?php
03.
$tid
=
$_SESSION
[
'login'
];
04.
$sql
=
"select Room from student where Teacher = '$tid'"
;
05.
$result
= mysql_query(
$sql
)
or
die
(
"<script>alert('error')</script>"
);
06.
while
(
$row
= mysql_fetch_array(
$result
))
07.
{
08.
?>
09.
<option value=
"<?PHP echo $row['Room'] ;?>"
><?PHP
echo
$row
[
'Room'
];?></option>
10.
<?
11.
}
12.
?>
13.
</select>