01.
<?php
02.
03.
$word1
=
$_POST
[
"word1"
];
04.
$word2
=
$_POST
[
"word2"
];
05.
$word3
=
$_POST
[
"word3"
];
06.
$word4
=
$_POST
[
"word4"
];
07.
$word5
=
$_POST
[
"word5"
];
08.
09.
$objConnect
= mysql_connect(
"127.0.0.1"
,
"root"
,
""
)
or
die
(
"Error Connect to Database"
);
10.
11.
$objDB
= mysql_select_db(
"disease_db"
);
12.
mysql_query(
"SET NAMES UTF8"
);
13.
14.
$strSQL
= "SELECT id_de, detail.id_di, organs, disease, intro,cause, symptem,refer,pic_or
15.
FROM detail
16.
LEFT JOIN disease ON detail.id_di = disease.id_di where detail.id_di in (
'$word1'
,
'$word2'
,
'$word3'
,
'$word4'
,
'$word5'
) ";
17.
18.
$objQuery
= mysql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
19.
20.
?>
21.
<html>
22.
<head>
23.
<title>Expert shirt model</title>
24.
<meta http-equiv=Content-Type content=
"text/html; charset=utf-8"
>
25.
<style type=
"text/css"
>
26.
body {
27.
background-image: url(bg2.jpg);
28.
}
29.
body,td,th {
30.
color: #000;
31.
}
32.
</style>
33.
</head>
34.
<body>
35.
<div align=
"center"
><!-- ส่วนหัวตาราง -->
36.
<table width=
"1075"
height=
"34"
border=
"0"
>
37.
<tr>
38.
<td width=
"6"
> <td width=
"1059"
height=
"289"
><img src=
"หน้าปก.gif"
width=
"1065"
height=
"291"
/></td>
39.
</tr>
40.
</table>
41.
<table width=
"1082"
height=
"304"
border=
"1"
>
42.
<tr>
43.
<th width=
"194"
bgcolor=
"#0066FF"
>รูปอวัยวะ</th>
44.
<th width=
"117"
bgcolor=
"#0066FF"
> <div align=
"center"
>หมายเลขสำรวจ </div></th>
45.
<th width=
"142"
bgcolor=
"#0066FF"
> <div align=
"center"
>อวัยวะ</div></th>
46.
<th width=
"612"
bgcolor=
"#0066FF"
> <div align=
"center"
>โอกาสที่จะเกิดโรค</div></th>
47.
</tr>
48.
<?php
49.
50.
while
(
$objResult
= mysql_fetch_array(
$objQuery
))
51.
{
52.
?>
53.
<!-- ส่วนแสดงข้อมูล -->
54.
<meta http-equiv=Content-Type content=
"text/html; charset=utf-8"
>
55.
<tr>
56.
<td><div align=
"center"
><img src=
"img/<?php echo $objResult["
pic_or
"];?>"
width=
"200"
></div></td>
57.
<td><div align=
"center"
><?php
echo
$objResult
[
"id_di"
];?></div></td>
58.
<td><div align=
"center"
><?php
echo
$objResult
[
"organs"
];?></div></td>
59.
<td><?php
echo
$objResult
[
"disease"
];?></td>
60.
</tr>
61.
<?php
62.
}
63.
?>
64.
</table>
65.
66.
</div>
67.
<p>
68.
<?php
69.
mysql_close(
$objConnect
);
70.
?>
71.
</p>
72.
<p> </p>
73.
<p> </p>
74.
<form name=
"form1"
method=
"post"
action=
"index1.php"
>
75.
<div align=
"center"
>
76.
<input type=
"submit"
name=
"btnback"
id=
"btnback"
value=
"ย้อนกลับ"
>
77.
</div>
78.
</form>
79.
<div align=
"justify"
></div>
80.
<div align=
"center"
></div>
81.
</body>
82.
</html>