001.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=tis-620"
/>
002.
<link href=
"../css/style.css"
rel=
"stylesheet"
type=
"text/css"
/>
003.
<?php
include
(
"header.php"
); ?>
004.
<?php
include
(
"menu.php"
); ?>
005.
006.
<?php
007.
include
(
"config.php"
);
008.
$sql
=
"select*from m_drug"
;
009.
$result
=mysql_query(
$sql
,
$conn
)
or
die
(
"sql ผิดพลาด"
);
010.
$num_rows
=mysql_num_rows(
$result
);
011.
?>
012.
013.
014.
<!--star content-->
015.
016.
<body>
017.
<td width=
"75"
valign=
"top"
><div align=
"center"
>
018.
<table width=
"800"
border=
"0"
>
019.
<tr>
020.
<td><div align=
"center"
>
021.
<form id=
"form1"
name=
"form1"
method=
"post"
action=
"inser_druguser.php"
>
022.
<table width=
"645"
border=
"0"
>
023.
<tr bgcolor=
"#FFCC33"
>
024.
<td colspan=
"2"
><div align=
"center"
><strong>การจ่ายยา</strong></div></td>
025.
</tr>
026.
027.
<tr>
028.
<td bgcolor=
"#FFFF99"
><div align=
"right"
>รหัสการจ่ายยา :</div></td>
029.
<td bgcolor=
"#FFFF99"
><input name=
"drugUserID"
type=
"text"
id=
"drugUserID"
size=
"15"
maxlength=
"4"
/></td>
030.
</tr>
031.
<tr>
032.
<td width=
"209"
bgcolor=
"#FFFF99"
><div align=
"right"
>รหัสการบริการ : </div></td>
033.
<td width=
"426"
bgcolor=
"#FFFF99"
><label>
034.
<input name=
"serviceID"
type=
"text"
id=
"serviceID"
size=
"15"
maxlength=
"4"
/>
035.
</label></td>
036.
</tr>
037.
<tr>
038.
<td bgcolor=
"#FFFF99"
><div align=
"right"
>ยาตัวที่ 1 : </div></td>
039.
<td bgcolor=
"#FFFF99"
><strong>
040.
<select name=
"drug1ID"
id=
"drug1ID"
>
041.
<?php
042.
$sql
=
"select * from m_drug "
;
043.
$result
= mysql_query(
$sql
,
$conn
)
044.
or
die
(
"ไม่สามารถดึงข้อมูลจากตาราง m_drug ได้"
.mysql_error());
045.
while
(
$data
=mysql_fetch_array(
$result
)) {
046.
?>
047.
<option value=
"<?php echo $data ['drugID']?>"
><?php
echo
$data
[
'drugName'
]?></option>
048.
<?php
049.
}
050.
?>
051.
</select>
052.
</strong>จำนวนจ่าย :<strong>
053.
<input name=
"number1"
type=
"text"
id=
"number1"
size=
"15"
maxlength=
"4"
/>
054.
<select name=
"unit1ID"
id=
"unit1ID"
>
055.
<?php
056.
$sql
=
"select * from m_unit "
;
057.
$result
= mysql_query(
$sql
,
$conn
)
058.
or
die
(
"ไม่สามารถดึงข้อมูลจากตาราง m_unit ได้"
.mysql_error());
059.
while
(
$data
=mysql_fetch_array(
$result
)) {
060.
?>
061.
<option value=
"<?php echo $data ['unitID']?>"
><?php
echo
$data
[
'unitName'
]?></option>
062.
<?php
063.
}
064.
?>
065.
</select>
066.
</strong></td>
067.
</tr>
068.
<tr>
069.
<td bgcolor=
"#FFFF99"
><div align=
"right"
>ยาตัวที่ 2 : </div></td>
070.
<td bgcolor=
"#FFFF99"
><strong>
071.
<select name=
"drug2ID"
id=
"drug2ID"
>
072.
<?php
073.
$sql
=
"select * from m_drug "
;
074.
$result
= mysql_query(
$sql
,
$conn
)
075.
or
die
(
"ไม่สามารถดึงข้อมูลจากตาราง m_drug ได้"
.mysql_error());
076.
while
(
$data
=mysql_fetch_array(
$result
)) {
077.
?>
078.
<option value=
"<?php echo $data ['drugID']?>"
><?php
echo
$data
[
'drugName'
]?></option>
079.
<?php
080.
}
081.
?>
082.
</select>
083.
</strong>จำนวนจ่าย : <strong>
084.
<input name=
"number2"
type=
"text"
id=
"number2"
size=
"15"
maxlength=
"4"
/>
085.
<select name=
"unit2ID"
id=
"unit2ID"
>
086.
<?php
087.
$sql
=
"select * from m_unit "
;
088.
$result
= mysql_query(
$sql
,
$conn
)
089.
or
die
(
"ไม่สามารถดึงข้อมูลจากตาราง m_unit ได้"
.mysql_error());
090.
while
(
$data
=mysql_fetch_array(
$result
)) {
091.
?>
092.
<option value=
"<?php echo $data ['unitID']?>"
><?php
echo
$data
[
'unitName'
]?></option>
093.
<?php
094.
}
095.
?>
096.
</select>
097.
</strong></td>
098.
</tr>
099.
<tr>
100.
<td bgcolor=
"#FFFF99"
><div align=
"right"
>ยาตัวที่ 3 : </div></td>
101.
<td bgcolor=
"#FFFF99"
><strong>
102.
<select name=
"drug3ID"
id=
"drug3ID"
>
103.
<?php
104.
$sql
=
"select * from m_drug "
;
105.
$result
= mysql_query(
$sql
,
$conn
)
106.
or
die
(
"ไม่สามารถดึงข้อมูลจากตาราง m_drug ได้"
.mysql_error());
107.
while
(
$data
=mysql_fetch_array(
$result
)) {
108.
?>
109.
<option value=
"<?php echo $data ['drugID']?>"
><?php
echo
$data
[
'drugName'
]?></option>
110.
<?php
111.
}
112.
?>
113.
</select>
114.
</strong>จำนวนจ่าย :
115.
<input name=
"number3"
type=
"text"
id=
"number3"
size=
"15"
maxlength=
"4"
/>
116.
<strong>
117.
<select name=
"unit3ID"
id=
"unit3ID"
>
118.
<?php
119.
$sql
=
"select * from m_unit "
;
120.
$result
= mysql_query(
$sql
,
$conn
)
121.
or
die
(
"ไม่สามารถดึงข้อมูลจากตาราง m_unit ได้"
.mysql_error());
122.
while
(
$data
=mysql_fetch_array(
$result
)) {
123.
?>
124.
<option value=
"<?php echo $data ['unitID']?>"
><?php
echo
$data
[
'unitName'
]?></option>
125.
<?php
126.
}
127.
?>
128.
</select>
129.
</strong></td>
130.
</tr>
131.
<tr>
132.
<td bgcolor=
"#FFFF99"
> </td>
133.
<td bgcolor=
"#FFFF99"
><input type=
"submit"
name=
"save"
id=
"save"
value=
"บันทึก"
/>
134.
<input type=
"reset"
name=
"cancel"
id=
"cancel"
onclick=
"history.go(-1) "
value=
"ยกเลิก"
/></td>
135.
</tr>
136.
</table>
137.
</form>
138.
</div></td>
139.
</tr>
140.
</table>
141.
</div>
142.
</table>
143.
<?php
include
(
"footer.php"
); ?>