01.
<tr>
02.
<td width=
"102"
align=
"right"
> Branch :</td>
03.
<td width=
"481"
align=
"left"
>
04.
<select name=
"branch"
id=
"branch"
>
05.
<option value=
""
>-- Select Branch --</option>
06.
<?
07.
include
"../connect.php"
;
08.
$sql=
"select * from branch"
;
09.
$result=mysql_db_query($dbname,$sql);
10.
$number=mysql_num_rows($result);
11.
$no=1;
12.
if
($number <> 0){
13.
While($rs=mysql_fetch_array($result)){
14.
$branch_id=$rs[branch_id];
15.
$branch_host=$rs[branch_host];
16.
$branch_name=$rs[branch_name];
17.
echo"
18.
<option value=
'$branch_name'
>$branch_name</option>";
19.
$no++;
20.
}
21.
mysql_close();
22.
}
23.
?>
24.
</select>
25.
<script language=
"JavaScript"
type=
"text/javascript"
>
26.
if
(theForm.branch.selectedIndex < 0)
27.
{
28.
alert(
"Please select one of the \"Branch\" options."
);
29.
theForm.branch.focus();
30.
return
(
false
);
31.
}</script></td>
32.
<td width=
"1"
> </td>
33.
</tr>